Use builtin C++ feature tests to check availability of language features
Assigned to Nobody
Link to original bugzilla bug (#1764)
Version: 3.5 (future version)
A lot of the relatively complicated feature detection code could be simplified by using built-in feature-tests of C++, e.g.,
// Does the compiler support variadic templates? #ifndef EIGEN_HAS_VARIADIC_TEMPLATES #if EIGEN_MAX_CPP_VER>=11 && defined(__cpp_variadic_templates) #define EIGEN_HAS_VARIADIC_TEMPLATES __cpp_variadic_templates #else #define EIGEN_HAS_VARIADIC_TEMPLATES 0 #endif #endif
This needs to be tested with older compiler however, and we either need to still add some extra tests, or just un-support compilers which do not support these feature-tests.