mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-08-12 03:39:01 +08:00
Adds macro for checking if C++14 variable templates are supported
This commit is contained in:
parent
391094c507
commit
1720057023
@ -184,7 +184,7 @@ template<int N, int DynamicKey> struct cleanup_index_type<std::integral_constant
|
|||||||
|
|
||||||
#ifndef EIGEN_PARSED_BY_DOXYGEN
|
#ifndef EIGEN_PARSED_BY_DOXYGEN
|
||||||
|
|
||||||
#if EIGEN_HAS_CXX14
|
#if EIGEN_HAS_CXX14_VARIABLE_TEMPLATES
|
||||||
template<int N>
|
template<int N>
|
||||||
static const internal::FixedInt<N> fix{};
|
static const internal::FixedInt<N> fix{};
|
||||||
#else
|
#else
|
||||||
|
@ -637,6 +637,14 @@
|
|||||||
#define EIGEN_COMP_CXXVER 03
|
#define EIGEN_COMP_CXXVER 03
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef EIGEN_HAS_CXX14_VARIABLE_TEMPLATES
|
||||||
|
#if defined(__cpp_variable_templates) && __cpp_variable_templates >= 201304 && EIGEN_MAX_CPP_VER>=14
|
||||||
|
#define EIGEN_HAS_CXX14_VARIABLE_TEMPLATES 1
|
||||||
|
#else
|
||||||
|
#define EIGEN_HAS_CXX14_VARIABLE_TEMPLATES 0
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
// The macros EIGEN_HAS_CXX?? defines a rough estimate of available c++ features
|
// The macros EIGEN_HAS_CXX?? defines a rough estimate of available c++ features
|
||||||
// but in practice we should not rely on them but rather on the availabilty of
|
// but in practice we should not rely on them but rather on the availabilty of
|
||||||
|
Loading…
x
Reference in New Issue
Block a user