diff options
author | Jonathan Wakely <jwakely@redhat.com> | 2020-03-27 22:53:04 +0000 |
---|---|---|
committer | Jonathan Wakely <jwakely@redhat.com> | 2020-03-27 22:53:04 +0000 |
commit | 0302a2de7f143bc4ac2a963761abc684b4dd6ddb (patch) | |
tree | feb9c78ec4ea86fdd56958a26b5fdaac9bc4056b | |
parent | 491009b609d354d2a5b8327b2deba58e1f2b2215 (diff) | |
download | gcc-0302a2de7f143bc4ac2a963761abc684b4dd6ddb.zip gcc-0302a2de7f143bc4ac2a963761abc684b4dd6ddb.tar.gz gcc-0302a2de7f143bc4ac2a963761abc684b4dd6ddb.tar.bz2 |
libstdc++: Move definition earlier in file
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.
-rw-r--r-- | libstdc++-v3/ChangeLog | 5 | ||||
-rw-r--r-- | libstdc++-v3/include/std/type_traits | 10 |
2 files changed, 10 insertions, 5 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 2445acb..e9bb4bf 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -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) diff --git a/libstdc++-v3/include/std/type_traits b/libstdc++-v3/include/std/type_traits index 68abf14..65b9902 100644 --- a/libstdc++-v3/include/std/type_traits +++ b/libstdc++-v3/include/std/type_traits @@ -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 |