libstdc++: Move definition earlier in file
authorJonathan Wakely <jwakely@redhat.com>
Fri, 27 Mar 2020 22:53:04 +0000 (22:53 +0000)
committerJonathan Wakely <jwakely@redhat.com>
Fri, 27 Mar 2020 22:53:04 +0000 (22:53 +0000)
This moves __is_array_convertible so it's not between
__is_nothrow_convertible and its helper, since it isn't related to
those.

* include/std/type_traits (__is_array_convertible): Move definition
to immediately after is_convertible.

libstdc++-v3/ChangeLog
libstdc++-v3/include/std/type_traits

index 2445acb50daae0c38a8e57db6b1a140f2e03666e..e9bb4bf39807bf7134dc7b30952fec4e19b3752d 100644 (file)
@@ -1,3 +1,8 @@
+2020-03-27  Jonathan Wakely  <jwakely@redhat.com>
+
+       * include/std/type_traits (__is_array_convertible): Move definition
+       to immediately after is_convertible.
+
 2020-03-26  Jonathan Wakely  <jwakely@redhat.com>
 
        * include/std/chrono (chrono::days, chrono::weeks, chrono::years)
index 68abf148a3806bc3a1def4c1d98fccf6907e4c45..65b9902b56d745683c212b7d23c9c4c09045cf4f 100644 (file)
@@ -1436,6 +1436,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
     : public __is_convertible_helper<_From, _To>::type
     { };
 
+  // helper trait for unique_ptr<T[]>, shared_ptr<T[]>, and span<T, N>
+  template<typename _ToElementType, typename _FromElementType>
+    using __is_array_convertible
+      = is_convertible<_FromElementType(*)[], _ToElementType(*)[]>;
+
   template<typename _From, typename _To,
            bool = __or_<is_void<_From>, is_function<_To>,
                         is_array<_To>>::value>
@@ -1465,11 +1470,6 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
     };
 #pragma GCC diagnostic pop
 
-  // helper trait for unique_ptr<T[]>, shared_ptr<T[]>, and span<T, N>
-  template<typename _ToElementType, typename _FromElementType>
-    using __is_array_convertible
-      = is_convertible<_FromElementType(*)[], _ToElementType(*)[]>;
-
   // is_nothrow_convertible for C++11
   template<typename _From, typename _To>
     struct __is_nothrow_convertible