This bugzilla service is closed. All entries have been migrated to https://gitlab.com/libeigen/eigen
Bug 1417 - Compile error for LinSpaced complex types
Summary: Compile error for LinSpaced complex types
Status: RESOLVED FIXED
Alias: None
Product: Eigen
Classification: Unclassified
Component: Core - general (show other bugs)
Version: 3.3 (current stable)
Hardware: x86 - 32-bit Windows
: Normal Compilation Problem
Assignee: Nobody
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-04-19 13:33 UTC by Markus Lindelöw
Modified: 2019-12-04 16:56 UTC (History)
3 users (show)



Attachments

Description Markus Lindelöw 2017-04-19 13:33:38 UTC
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_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: https://bitbucket.org/eigen/eigen/commits/84b9b23f18f6/
> 3.3:   https://bitbucket.org/eigen/eigen/commits/2ea537d6db09/

Fantastic!
Comment 3 Nobody 2019-12-04 16:56:43 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to gitlab.com's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.com/libeigen/eigen/issues/1417.

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