-
Notifications
You must be signed in to change notification settings - Fork 21
Open
Description
When using IntervalVectors and standard types, for example doubles :
IntervalVector x(2);
double y = 0.3;Binary operators & and | won't work with the mixed-type product as left-hand operand :
IntervalVector z_bad = (x * y) | x; // breaks
IntervalVector z_good = x | (x * y); // worksCompilation will output the following :
/codac/build_install/include/eigen3/Eigen/src/Core/functors/BinaryFunctors.h:573:3:
error: static assertion failed: BITWISE OPERATIONS MAY ONLY BE PERFORMED ON PLAIN DATA TYPES
573 | EIGEN_STATIC_ASSERT(!NumTraits<Scalar>::RequireInitialization,
| ^~~~~~~~~~~~~~~~~~~Note : This can be resolved by casting the mixed prodcut to IntervalVector, but this issue can be tricky to detect.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels