Add support for N4389 - std::bool_constant

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@237636 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Marshall Clow
2015-05-18 23:21:06 +00:00
parent bc9ccda541
commit e62560a9b6
4 changed files with 58 additions and 13 deletions

View File

@@ -398,11 +398,11 @@ struct _LIBCPP_TYPE_VIS_ONLY ratio_subtract
template <class _R1, class _R2>
struct _LIBCPP_TYPE_VIS_ONLY ratio_equal
: public integral_constant<bool, _R1::num == _R2::num && _R1::den == _R2::den> {};
: public _LIBCPP_BOOL_CONSTANT((_R1::num == _R2::num && _R1::den == _R2::den)) {};
template <class _R1, class _R2>
struct _LIBCPP_TYPE_VIS_ONLY ratio_not_equal
: public integral_constant<bool, !ratio_equal<_R1, _R2>::value> {};
: public _LIBCPP_BOOL_CONSTANT((!ratio_equal<_R1, _R2>::value)) {};
// ratio_less
@@ -461,19 +461,19 @@ struct __ratio_less<_R1, _R2, -1LL, -1LL>
template <class _R1, class _R2>
struct _LIBCPP_TYPE_VIS_ONLY ratio_less
: public integral_constant<bool, __ratio_less<_R1, _R2>::value> {};
: public _LIBCPP_BOOL_CONSTANT((__ratio_less<_R1, _R2>::value)) {};
template <class _R1, class _R2>
struct _LIBCPP_TYPE_VIS_ONLY ratio_less_equal
: public integral_constant<bool, !ratio_less<_R2, _R1>::value> {};
: public _LIBCPP_BOOL_CONSTANT((!ratio_less<_R2, _R1>::value)) {};
template <class _R1, class _R2>
struct _LIBCPP_TYPE_VIS_ONLY ratio_greater
: public integral_constant<bool, ratio_less<_R2, _R1>::value> {};
: public _LIBCPP_BOOL_CONSTANT((ratio_less<_R2, _R1>::value)) {};
template <class _R1, class _R2>
struct _LIBCPP_TYPE_VIS_ONLY ratio_greater_equal
: public integral_constant<bool, !ratio_less<_R1, _R2>::value> {};
: public _LIBCPP_BOOL_CONSTANT((!ratio_less<_R1, _R2>::value)) {};
template <class _R1, class _R2>
struct __ratio_gcd