Implement n3545 for c++14

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@185856 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Marshall Clow 2013-07-08 20:05:31 +00:00
parent 0769e6a785
commit d29bb4b7c4
2 changed files with 9 additions and 0 deletions
include
test/utilities/meta/meta.hel

@ -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 <class _Tp, _Tp __v>

@ -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<std::false_type::value_type, bool>::value), "");
static_assert((std::is_same<std::false_type::type, std::false_type>::value), "");