mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
Add unit tests for bug #981: valid and invalid usage of ternary operator
This commit is contained in:
13
failtest/ternary_2.cpp
Normal file
13
failtest/ternary_2.cpp
Normal file
@@ -0,0 +1,13 @@
|
||||
#include "../Eigen/Core"
|
||||
|
||||
using namespace Eigen;
|
||||
|
||||
int main(int argc,char **)
|
||||
{
|
||||
VectorXf a(10), b(10);
|
||||
#ifdef EIGEN_SHOULD_FAIL_TO_BUILD
|
||||
b = argc>1 ? 2*a : a+a;
|
||||
#else
|
||||
b = argc>1 ? VectorXf(2*a) : VectorXf(a+a);
|
||||
#endif
|
||||
}
|
||||
Reference in New Issue
Block a user