From 8492f7dd51aff17fd755c9f9dd4dc5874ddd6dec Mon Sep 17 00:00:00 2001 From: Jonathan Wakely Date: Mon, 5 Sep 2022 15:52:34 +0100 Subject: libstdc++: Move __success_type and __failure_type later in file libstdc++-v3/ChangeLog: * include/std/type_traits (__success_type, __failure_type): Move definitions later in the file. --- libstdc++-v3/include/std/type_traits | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) (limited to 'libstdc++-v3') diff --git a/libstdc++-v3/include/std/type_traits b/libstdc++-v3/include/std/type_traits index e19d964..e4d1679 100644 --- a/libstdc++-v3/include/std/type_traits +++ b/libstdc++-v3/include/std/type_traits @@ -286,18 +286,6 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION >::type __is_complete_or_unbounded(_TypeIdentity) { return {}; } - // For several sfinae-friendly trait implementations we transport both the - // result information (as the member type) and the failure information (no - // member type). This is very similar to std::enable_if, but we cannot use - // them, because we need to derive from them as an implementation detail. - - template - struct __success_type - { typedef _Tp type; }; - - struct __failure_type - { }; - // __remove_cv_t (std::remove_cv_t for C++11). template using __remove_cv_t = typename remove_cv<_Tp>::type; @@ -2162,6 +2150,19 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION // Sfinae-friendly common_type implementation: /// @cond undocumented + + // For several sfinae-friendly trait implementations we transport both the + // result information (as the member type) and the failure information (no + // member type). This is very similar to std::enable_if, but we cannot use + // that, because we need to derive from them as an implementation detail. + + template + struct __success_type + { typedef _Tp type; }; + + struct __failure_type + { }; + struct __do_common_type_impl { template -- cgit v1.1