[libc++] Remove the _LIBCPP_BOOL_CONSTANT macro

I suspect this is a remnant of the times when we were not comfortable
using Clang's C++11/14 extensions everywhere, but now we do, so we can
use _BoolConstant instead and get rid of the macro.

Differential Revision: https://reviews.llvm.org/D122351

NOKEYCHECK=True
GitOrigin-RevId: f900f7025c7baf4f24dd6425cf0609182ee7efd5
diff --git a/include/exception b/include/exception
index 5460b73..a60c8e6 100644
--- a/include/exception
+++ b/include/exception
@@ -300,10 +300,10 @@
 }
 
 template <class _From, class _To>
-struct __can_dynamic_cast : public _LIBCPP_BOOL_CONSTANT(
+struct __can_dynamic_cast : _BoolConstant<
               is_polymorphic<_From>::value &&
                  (!is_base_of<_To, _From>::value ||
-                   is_convertible<const _From*, const _To*>::value)) {};
+                   is_convertible<const _From*, const _To*>::value)> {};
 
 template <class _Ep>
 inline _LIBCPP_INLINE_VISIBILITY
diff --git a/include/ratio b/include/ratio
index 8970ba3..07376bf 100644
--- a/include/ratio
+++ b/include/ratio
@@ -416,11 +416,11 @@
 
 template <class _R1, class _R2>
 struct _LIBCPP_TEMPLATE_VIS ratio_equal
-    : public _LIBCPP_BOOL_CONSTANT((_R1::num == _R2::num && _R1::den == _R2::den)) {};
+    : _BoolConstant<(_R1::num == _R2::num && _R1::den == _R2::den)> {};
 
 template <class _R1, class _R2>
 struct _LIBCPP_TEMPLATE_VIS ratio_not_equal
-    : public _LIBCPP_BOOL_CONSTANT((!ratio_equal<_R1, _R2>::value)) {};
+    : _BoolConstant<!ratio_equal<_R1, _R2>::value> {};
 
 // ratio_less
 
@@ -479,19 +479,19 @@
 
 template <class _R1, class _R2>
 struct _LIBCPP_TEMPLATE_VIS ratio_less
-    : public _LIBCPP_BOOL_CONSTANT((__ratio_less<_R1, _R2>::value)) {};
+    : _BoolConstant<__ratio_less<_R1, _R2>::value> {};
 
 template <class _R1, class _R2>
 struct _LIBCPP_TEMPLATE_VIS ratio_less_equal
-    : public _LIBCPP_BOOL_CONSTANT((!ratio_less<_R2, _R1>::value)) {};
+    : _BoolConstant<!ratio_less<_R2, _R1>::value> {};
 
 template <class _R1, class _R2>
 struct _LIBCPP_TEMPLATE_VIS ratio_greater
-    : public _LIBCPP_BOOL_CONSTANT((ratio_less<_R2, _R1>::value)) {};
+    : _BoolConstant<ratio_less<_R2, _R1>::value> {};
 
 template <class _R1, class _R2>
 struct _LIBCPP_TEMPLATE_VIS ratio_greater_equal
-    : public _LIBCPP_BOOL_CONSTANT((!ratio_less<_R1, _R2>::value)) {};
+    : _BoolConstant<!ratio_less<_R1, _R2>::value> {};
 
 template <class _R1, class _R2>
 struct __ratio_gcd
diff --git a/include/type_traits b/include/type_traits
index 6504040..0ecb0f9 100644
--- a/include/type_traits
+++ b/include/type_traits
@@ -450,9 +450,6 @@
 #if _LIBCPP_STD_VER > 14
 template <bool __b>
 using bool_constant = integral_constant<bool, __b>;
-#define _LIBCPP_BOOL_CONSTANT(__b) bool_constant<(__b)>
-#else
-#define _LIBCPP_BOOL_CONSTANT(__b) integral_constant<bool,(__b)>
 #endif
 
 template <bool, class _Tp = void> struct _LIBCPP_TEMPLATE_VIS enable_if {};
@@ -464,8 +461,8 @@
 template <bool _Bp, class _Tp = void> using enable_if_t = typename enable_if<_Bp, _Tp>::type;
 #endif
 
-typedef _LIBCPP_BOOL_CONSTANT(true)  true_type;
-typedef _LIBCPP_BOOL_CONSTANT(false) false_type;
+typedef integral_constant<bool, true>  true_type;
+typedef integral_constant<bool, false> false_type;
 
 template <bool _Val>
 using _BoolConstant _LIBCPP_NODEBUG = integral_constant<bool, _Val>;
@@ -1354,7 +1351,7 @@
 #else // __has_keyword(__is_signed)
 
 template <class _Tp, bool = is_integral<_Tp>::value>
-struct __libcpp_is_signed_impl : public _LIBCPP_BOOL_CONSTANT(_Tp(-1) < _Tp(0)) {};
+struct __libcpp_is_signed_impl : public _BoolConstant<(_Tp(-1) < _Tp(0))> {};
 
 template <class _Tp>
 struct __libcpp_is_signed_impl<_Tp, false> : public true_type {};  // floating point
@@ -1392,7 +1389,7 @@
 #else // __has_keyword(__is_unsigned)
 
 template <class _Tp, bool = is_integral<_Tp>::value>
-struct __libcpp_is_unsigned_impl : public _LIBCPP_BOOL_CONSTANT(_Tp(0) < _Tp(-1)) {};
+struct __libcpp_is_unsigned_impl : public _BoolConstant<(_Tp(0) < _Tp(-1))> {};
 
 template <class _Tp>
 struct __libcpp_is_unsigned_impl<_Tp, false> : public false_type {};  // floating point