From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2181) id 986C6385483A; Mon, 5 Sep 2022 16:44:43 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 986C6385483A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1662396283; bh=/uyPu960lHfY8psr5jKjLJGkDHSOK3j29XF514Y/ZXk=; h=From:To:Subject:Date:From; b=viqsY9ix4oxo7MY31hpBmbNDZqRtvnbBHmR5BiH2RTfue/tIYXiHpkBnNm1bU8WTE QaEU4dW7RsXIHiyB/YyZfksFYV9V3bUp4MDAKi+nuOP6FsxajCA2VM4iaQq5n2JStS hQ6eWeLdXzBGg84+aHUqnMuCPvAGRc1MDbX5bA00= MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Jonathan Wakely To: gcc-cvs@gcc.gnu.org, libstdc++-cvs@gcc.gnu.org Subject: [gcc r13-2447] libstdc++: Move __success_type and __failure_type later in file X-Act-Checkin: gcc X-Git-Author: Jonathan Wakely X-Git-Refname: refs/heads/master X-Git-Oldrev: 938cda536019cd6a1bc0dd2346381185b420bbf8 X-Git-Newrev: 8492f7dd51aff17fd755c9f9dd4dc5874ddd6dec Message-Id: <20220905164443.986C6385483A@sourceware.org> Date: Mon, 5 Sep 2022 16:44:43 +0000 (GMT) List-Id: https://gcc.gnu.org/g:8492f7dd51aff17fd755c9f9dd4dc5874ddd6dec commit r13-2447-g8492f7dd51aff17fd755c9f9dd4dc5874ddd6dec Author: Jonathan Wakely Date: Mon Sep 5 15:52:34 2022 +0100 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. Diff: --- libstdc++-v3/include/std/type_traits | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/libstdc++-v3/include/std/type_traits b/libstdc++-v3/include/std/type_traits index e19d964fa9c..e4d167939d9 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