mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
bug #1752: make is_convertible equivalent to the std c++11 equivalent and fallback to std::is_convertible when c++11 is enabled.
This commit is contained in:
@@ -87,8 +87,12 @@ EIGEN_DECLARE_TEST(meta)
|
||||
STATIC_CHECK(( internal::is_convertible<const Matrix3f&,const Matrix3f&>::value ));
|
||||
STATIC_CHECK((!internal::is_convertible<const Matrix3f&,Matrix3f&>::value ));
|
||||
STATIC_CHECK((!internal::is_convertible<const Matrix3f,Matrix3f&>::value ));
|
||||
STATIC_CHECK(( internal::is_convertible<Matrix3f,Matrix3f&>::value )); // std::is_convertible returns false here though Matrix3f from; Matrix3f& to = from; is valid.
|
||||
//STATIC_CHECK((!internal::is_convertible<Matrix3f,Matrix3d>::value )); //does not work because the conversion is prevented by a static assertion
|
||||
STATIC_CHECK(!( internal::is_convertible<Matrix3f,Matrix3f&>::value ));
|
||||
|
||||
STATIC_CHECK(!( internal::is_convertible<int,int&>::value ));
|
||||
STATIC_CHECK(( internal::is_convertible<const int,const int& >::value ));
|
||||
|
||||
//STATIC_CHECK((!internal::is_convertible<Matrix3f,Matrix3d>::value )); //does not even compile because the conversion is prevented by a static assertion
|
||||
STATIC_CHECK((!internal::is_convertible<Array33f,int>::value ));
|
||||
STATIC_CHECK((!internal::is_convertible<MatrixXf,float>::value ));
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user