[go: up one dir, main page]

Compile error for LinSpaced complex types

Submitted by Markus Lindelöw

Assigned to Nobody

Link to original bugzilla bug (#1417)
Version: 3.3 (current stable)
Operating system: Windows

Description

Hi,

First:
thanks for a wonderful library. The api-syntax is such a joy to work with.

Second:
I'm having problem to compile LinSpaced complex types.

Eigen: 3.3.3
Compiler: Visual Studio 2015 (MSVC++ 14.0, _MSC_VER 1900)

Example code to reproduce the error:

#include <Eigen/Core>
#include <complex>
int main()
{
Eigen::ArrayXXcd table(10, 4);
table.col(0) = Eigen::ArrayXcd::LinSpaced(10, std::complex<double>(0,0), std::complex<double>(90,90));
}

Results in the following compile error:
Error C2440 'return': cannot convert from 'const Eigen::internal::unpacket_traitsEigen::internal::Packet1cd::type' to 'Eigen::internal::Packet1cd'

I get similar error for complex<float>, but float, double and int types works.

Edited by Eigen Bugzilla