Add support for N4389 - std::bool_constant
llvm-svn: 237636
Cr-Mirrored-From: sso://chromium.googlesource.com/_direct/external/github.com/llvm/llvm-project
Cr-Mirrored-Commit: cd6615fd7186e397b4318d8b77c82b9de52ed45f
diff --git a/include/ratio b/include/ratio
index 25ab503..6ddc19b 100644
--- a/include/ratio
+++ b/include/ratio
@@ -398,11 +398,11 @@
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 @@
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