New user self-registration is currently disabled. Please email eigen-core-team @ lists.tuxfamily.org if you need an account.
Bug 1231 - Regression on dev branch vs. 3.2: cwise division of complex by real doesn't compile
Regression on dev branch vs. 3.2: cwise division of complex by real doesn't c...
Status: RESOLVED FIXED
Product: Eigen
Classification: Unclassified
Component: Core - general
3.3 (current stable)
All All
: Normal Compilation Problem
Assigned To: Nobody
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2016-05-18 18:50 UTC by Rasmus Munk Larsen
Modified: 2016-05-18 21:02 UTC (History)
3 users (show)



Attachments

Description Rasmus Munk Larsen 2016-05-18 18:50:44 UTC
The following no longer compiles:


#include <complex>
#include "Eigen/Core"

template <typename Scalar = double>
using Matrix = Eigen::Matrix<Scalar, Eigen::Dynamic, 1>;

Matrix<std::complex<double>> v;
Matrix<double> y;
v.setRandom(5);
y.setRandom(5);
v.array() /= y.array();



It hits the mixed type assert:

./third_party/eigen3/Eigen/src/Core/AssignEvaluator.h:778:3: error: static_assert failed "YOU_MIXED_DIFFERENT_NUMERIC_TYPES__YOU_NEED_TO_USE_THE_CAST_METHOD_OF_MATRIXBASE_TO_CAST_NUMERIC_TYPES_EXPLICITLY"

This seems too strict and a clear regression.
Comment 1 Gael Guennebaud 2016-05-18 21:02:36 UTC
https://bitbucket.org/eigen/eigen/commits/6a6cc7eb0f54/

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