diff --git a/include/type_traits b/include/type_traits index 450b5928..dd84abf2 100644 --- a/include/type_traits +++ b/include/type_traits @@ -236,6 +236,10 @@ struct _LIBCPP_TYPE_VIS integral_constant typedef integral_constant type; _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR operator value_type() const {return value;} +#if _LIBCPP_STD_VER > 11 + _LIBCPP_INLINE_VISIBILITY + constexpr value_type operator ()() const {return value;} +#endif }; template diff --git a/test/utilities/meta/meta.hel/integral_constant.pass.cpp b/test/utilities/meta/meta.hel/integral_constant.pass.cpp index 7f9e2769..92d13c55 100644 --- a/test/utilities/meta/meta.hel/integral_constant.pass.cpp +++ b/test/utilities/meta/meta.hel/integral_constant.pass.cpp @@ -26,6 +26,11 @@ int main() assert(_5() == 5); #endif +#if _LIBCPP_STD_VER > 11 + static_assert ( _5{}() == 5, "" ); + static_assert ( std::true_type{}(), "" ); +#endif + static_assert(std::false_type::value == false, ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), "");