diff options
author | Gael Guennebaud <g.gael@free.fr> | 2019-10-10 11:40:21 +0200 |
---|---|---|
committer | Gael Guennebaud <g.gael@free.fr> | 2019-10-10 11:40:21 +0200 |
commit | fb557aec5c1e4d75ef9293952dbfb03bbb357d6d (patch) | |
tree | 24e2cdad90329cccae55402a0772db520f9e2545 /test | |
parent | f0a4642baba70a64128964d96c4ede012614925e (diff) |
bug #1752: disable some is_convertible tests for recent compilers.
Diffstat (limited to 'test')
-rw-r--r-- | test/meta.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/meta.cpp b/test/meta.cpp index ea9607fe7..51395acd0 100644 --- a/test/meta.cpp +++ b/test/meta.cpp @@ -101,6 +101,14 @@ EIGEN_DECLARE_TEST(meta) VERIFY(( check_is_convertible(A*B, A) )); } + #if (EIGEN_COMP_GNUC && EIGEN_COMP_GNUC <= 99) \ + || (EIGEN_COMP_CLANG && EIGEN_COMP_CLANG <= 909) \ + || (EIGEN_COMP_MSVC && EIGEN_COMP_MSVC <=1914) + // See http://eigen.tuxfamily.org/bz/show_bug.cgi?id=1752, + // basically, a fix in the c++ standard breaks our c++98 implementation + // of is_convertible for abstract classes. + // So the following tests are expected to fail with recent compilers. + STATIC_CHECK(( !internal::is_convertible<MyInterface, MyImpl>::value )); #if (!EIGEN_COMP_GNUC_STRICT) || (EIGEN_GNUC_AT_LEAST(4,8)) // GCC prior to 4.8 fails to compile this test: @@ -110,12 +118,16 @@ EIGEN_DECLARE_TEST(meta) STATIC_CHECK(( !internal::is_convertible<MyImpl, MyInterface>::value )); #endif STATIC_CHECK(( internal::is_convertible<MyImpl, const MyInterface&>::value )); + + #endif + { int i; VERIFY(( check_is_convertible(fix<3>(), i) )); VERIFY((!check_is_convertible(i, fix<DynamicIndex>()) )); } + VERIFY(( internal::has_ReturnType<FooReturnType>::value )); VERIFY(( internal::has_ReturnType<ScalarBinaryOpTraits<int,int> >::value )); VERIFY(( !internal::has_ReturnType<MatrixXf>::value )); |