Use __and_v<...> instead of __and_<...>::value
authorJonathan Wakely <jwakely@redhat.com>
Wed, 24 Apr 2019 16:25:21 +0000 (17:25 +0100)
committerJonathan Wakely <redi@gcc.gnu.org>
Wed, 24 Apr 2019 16:25:21 +0000 (17:25 +0100)
* include/std/any (any::any(ValueType&&)): Use __and_v.
* include/std/numeric (midpoint(T, T, T), midpoint(T*, T*, T*)):
Likewise.

From-SVN: r270552

libstdc++-v3/ChangeLog
libstdc++-v3/include/std/any
libstdc++-v3/include/std/numeric

index 913c8ebf66ce25d8453afe842eb1b02e30405a39..33b6371bd0d2b60fe299204e98bba4e9953c4454 100644 (file)
@@ -1,5 +1,9 @@
 2019-04-24  Jonathan Wakely  <jwakely@redhat.com>
 
+       * include/std/any (any::any(ValueType&&)): Use __and_v.
+       * include/std/numeric (midpoint(T, T, T), midpoint(T*, T*, T*)):
+       Likewise.
+
        * include/std/tuple (apply): Use remove_reference_t instead of decay_t
        as per P0777R1.
        * include/std/type_traits (__result_of_memfun): Use remove_reference
index 29fe03e2b82a5f562d7bd9fdeb5ea27c04ac424b..8cbabdddd9b735479b65b7fac9516f915617ac2d 100644 (file)
@@ -189,9 +189,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
     /// Construct with a copy of @p __value as the contained object.
     template <typename _ValueType, typename _Tp = _Decay<_ValueType>,
              typename _Mgr = _Manager<_Tp>,
-              enable_if_t<__and_<is_copy_constructible<_Tp>,
-                                __not_<is_constructible<_Tp, _ValueType&&>>,
-                                __not_<__is_in_place_type<_Tp>>>::value,
+              enable_if_t<__and_v<is_copy_constructible<_Tp>,
+                                 __not_<is_constructible<_Tp, _ValueType&&>>,
+                                 __not_<__is_in_place_type<_Tp>>>,
                          bool> = false>
       any(_ValueType&& __value)
       : _M_manager(&_Mgr::_S_manage)
index ffd9eae9691dca57ff87cbd7d848c18d2cd971b4..4858ad1aea3a2af25df72b62d0bcb9a666bb50aa 100644 (file)
@@ -162,8 +162,8 @@ namespace __detail
 
 template<typename _Tp>
     constexpr
-    enable_if_t<__and_<is_arithmetic<_Tp>, is_same<remove_cv_t<_Tp>, _Tp>,
-                      __not_<is_same<_Tp, bool>>>::value,
+    enable_if_t<__and_v<is_arithmetic<_Tp>, is_same<remove_cv_t<_Tp>, _Tp>,
+                       __not_<is_same<_Tp, bool>>>,
                _Tp>
     midpoint(_Tp __a, _Tp __b) noexcept
     {
@@ -192,8 +192,7 @@ template<typename _Tp>
 
   template<typename _Tp>
     constexpr
-    enable_if_t<__and_<is_object<_Tp>, bool_constant<sizeof(_Tp) != 0>>::value,
-               _Tp*>
+    enable_if_t<__and_v<is_object<_Tp>, bool_constant<sizeof(_Tp) != 0>>, _Tp*>
     midpoint(_Tp* __a, _Tp* __b) noexcept
     {
       return __a > __b ? __b + (__a - __b) / 2 : __a + (__b - __a) / 2;