mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-04-19 08:09:36 +08:00
Add unit-test for Visual2013 ambiguous call to operator=
This commit is contained in:
parent
6441befbb3
commit
23da99492f
@ -221,6 +221,12 @@ int test_ref_overload_fun1(Ref<MatrixXf> ) { return 3; }
|
|||||||
int test_ref_overload_fun2(Ref<const MatrixXd> ) { return 4; }
|
int test_ref_overload_fun2(Ref<const MatrixXd> ) { return 4; }
|
||||||
int test_ref_overload_fun2(Ref<const MatrixXf> ) { return 5; }
|
int test_ref_overload_fun2(Ref<const MatrixXf> ) { return 5; }
|
||||||
|
|
||||||
|
void test_ref_ambiguous(const Ref<const ArrayXd> &A, Ref<ArrayXd> B)
|
||||||
|
{
|
||||||
|
B = A;
|
||||||
|
B = A - A;
|
||||||
|
}
|
||||||
|
|
||||||
// See also bug 969
|
// See also bug 969
|
||||||
void test_ref_overloads()
|
void test_ref_overloads()
|
||||||
{
|
{
|
||||||
@ -233,6 +239,9 @@ void test_ref_overloads()
|
|||||||
VERIFY( test_ref_overload_fun2(Ad)==4 );
|
VERIFY( test_ref_overload_fun2(Ad)==4 );
|
||||||
VERIFY( test_ref_overload_fun2(Ad+Bd)==4 );
|
VERIFY( test_ref_overload_fun2(Ad+Bd)==4 );
|
||||||
VERIFY( test_ref_overload_fun2(Af+Bf)==5 );
|
VERIFY( test_ref_overload_fun2(Af+Bf)==5 );
|
||||||
|
|
||||||
|
ArrayXd A, B;
|
||||||
|
test_ref_ambiguous(A, B);
|
||||||
}
|
}
|
||||||
|
|
||||||
void test_ref()
|
void test_ref()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user