From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id 938453854144 for ; Mon, 5 Sep 2022 16:45:08 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 938453854144 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1662396308; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+iMG9eb0FfKiocpVH3Yl6+sZfLEXugr/nDhQsJHvHjE=; b=Rl9NHIu3h+b50ERZR7Ct+2zD7rJsJnmRronaA/J7wHmrDHkZNTXHXWLKZUPpQunhPVrRrH +DcDspc5bVQGBybHS7e24nOSdh987qtyLEAoekBbvcrKpDqrrSjaLTVCRPvQXlvCyR+jqG J/Y63vVpCEcBjtm6ZxSitG3QKNHG0dE= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-584-Dqi0GCKQMjKzf7ia1jjSrw-1; Mon, 05 Sep 2022 12:45:05 -0400 X-MC-Unique: Dqi0GCKQMjKzf7ia1jjSrw-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id E62BD3804506; Mon, 5 Sep 2022 16:45:04 +0000 (UTC) Received: from localhost (unknown [10.33.36.33]) by smtp.corp.redhat.com (Postfix) with ESMTP id AB8A61415102; Mon, 5 Sep 2022 16:45:04 +0000 (UTC) From: Jonathan Wakely To: libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org Subject: [committed] libstdc++: Move __success_type and __failure_type later in file Date: Mon, 5 Sep 2022 17:45:04 +0100 Message-Id: <20220905164504.670854-1-jwakely@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.85 on 10.11.54.7 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-12.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_NONE,TXREP,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Tested x86_64-linux, pushed to trunk. -- >8 -- 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(-) 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 -- 2.37.3