diff --git a/include/meta/meta_fwd.hpp b/include/meta/meta_fwd.hpp index edfb9068..ac041999 100644 --- a/include/meta/meta_fwd.hpp +++ b/include/meta/meta_fwd.hpp @@ -152,6 +152,13 @@ #define META_TYPE_CONSTRAINT(...) typename #endif +#if (defined(__cpp_lib_type_trait_variable_templates) && \ + __cpp_lib_type_trait_variable_templates > 0) +#define META_CXX_TRAIT_VARIABLE_TEMPLATES 1 +#else +#define META_CXX_TRAIT_VARIABLE_TEMPLATES 0 +#endif + namespace meta { #if META_CXX_INTEGER_SEQUENCE @@ -208,8 +215,10 @@ namespace meta META_CONCEPT_BARRIER(__is_same(T, U)); #elif defined(__GNUC__) && __GNUC__ >= 6 META_CONCEPT_BARRIER(__is_same_as(T, U)); -#else +#elif defined(META_CXX_TRAIT_VARIABLE_TEMPLATES) META_CONCEPT_BARRIER(std::is_same_v); +#else + META_CONCEPT_BARRIER(std::is_same::value); #endif template