New user self-registration is currently disabled. Please email eigen-core-team @ if you need an account.
Bug 1417 - Compile error for LinSpaced complex types
Compile error for LinSpaced complex types
Product: Eigen
Classification: Unclassified
Component: Core - general
3.3 (current stable)
x86 - 32-bit Windows
: Normal Compilation Problem
Assigned To: Nobody
Depends on:
  Show dependency treegraph
Reported: 2017-04-19 13:33 UTC by Markus Lindelöw
Modified: 2017-06-06 18:21 UTC (History)
3 users (show)


Description Markus Lindelöw 2017-04-19 13:33:38 UTC

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

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_traits<Eigen::internal::Packet1cd>::type' to 'Eigen::internal::Packet1cd'

I get similar error for complex<float>, but float, double and int types works.
Comment 2 Markus Lindelöw 2017-06-06 18:21:41 UTC
(In reply to Gael Guennebaud from comment #1)
> Fixed:
> devel:
> 3.3:


Note You need to log in before you can comment on or make changes to this bug.