From patchwork Wed Oct 10 12:03:22 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Carlini X-Patchwork-Id: 190618 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id 179312C0089 for ; Wed, 10 Oct 2012 23:03:47 +1100 (EST) Comment: DKIM? See http://www.dkim.org DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=gcc.gnu.org; s=default; x=1350475428; h=Comment: DomainKey-Signature:Received:Received:Received:Received:Received: Received:Received:Message-ID:Date:From:User-Agent:MIME-Version: To:CC:Subject:References:In-Reply-To:Content-Type:Mailing-List: Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:Sender:Delivered-To; bh=7fb/ruRBU35+3fzhhRWov1nX8Ng=; b=AXd8e5qjuroaRIvu0+5LCBIQ/LDbWO7VvJu13ASif+nGHSPBCNLDhL4LPANjjf utDARG5iMAKQKcBZNzKFgQsQc1zad3pHG4HubsvCPBxJ1Rsa0YEIANmy3pgp5Mcy B+SgClglIGIy2mWs2I4ysF/pW45f7vnJj27EsvVR8lEOE= Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=gcc.gnu.org; h=Received:Received:X-SWARE-Spam-Status:X-Spam-Check-By:Received:Received:Received:Received:Received:Message-ID:Date:From:User-Agent:MIME-Version:To:CC:Subject:References:In-Reply-To:Content-Type:X-IsSubscribed:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=heAnoi1erZQR5qLCZRsxNSzGg1kKkwGhj6/5/h44e/vpdoUNkNSc9MH1NieNcO S6mKLnhs4arNhPOulTQplGVUtiiJIeIozfp+OxVkVccw5QL8J2D9t4a9xxMfalqN OOkPVCt/OsHK93TVwWu0wiyZ/lhNYNB7yXTqgxUFf/PjE=; Received: (qmail 27109 invoked by alias); 10 Oct 2012 12:03:33 -0000 Received: (qmail 27090 invoked by uid 22791); 10 Oct 2012 12:03:31 -0000 X-SWARE-Spam-Status: No, hits=-8.7 required=5.0 tests=AWL, BAYES_00, KHOP_RCVD_UNTRUST, KHOP_THREADED, RCVD_IN_DNSWL_HI, RCVD_IN_HOSTKARMA_NO, RCVD_IN_HOSTKARMA_YE, RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from acsinet15.oracle.com (HELO acsinet15.oracle.com) (141.146.126.227) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 10 Oct 2012 12:03:28 +0000 Received: from acsinet21.oracle.com (acsinet21.oracle.com [141.146.126.237]) by acsinet15.oracle.com (Sentrion-MTA-4.2.2/Sentrion-MTA-4.2.2) with ESMTP id q9AC3P64006305 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 10 Oct 2012 12:03:26 GMT Received: from acsmt356.oracle.com (acsmt356.oracle.com [141.146.40.156]) by acsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id q9AC3PGA000302 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 10 Oct 2012 12:03:25 GMT Received: from abhmt112.oracle.com (abhmt112.oracle.com [141.146.116.64]) by acsmt356.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id q9AC3PGi021069; Wed, 10 Oct 2012 07:03:25 -0500 Received: from [192.168.1.4] (/79.43.235.203) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Wed, 10 Oct 2012 05:03:24 -0700 Message-ID: <5075640A.9080902@oracle.com> Date: Wed, 10 Oct 2012 14:03:22 +0200 From: Paolo Carlini User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/20120825 Thunderbird/15.0 MIME-Version: 1.0 To: "gcc-patches@gcc.gnu.org" CC: libstdc++ , =?UTF-8?B?RGFuaWVsIEtyw7xnbGVy?= Subject: Re: [v3] "SFINAE-friendly" std::common_type and more References: <5074A64D.1070106@oracle.com> In-Reply-To: <5074A64D.1070106@oracle.com> X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org ... tested x86_64-linux. Committed to mainline. Paolo. //////////////////// 2012-10-10 Paolo Carlini * include/std/type_traits (__do_common_type_impl): Revert for now LWG 2141-related change. * testsuite/20_util/common_type/requirements/typedefs-1.cc: Likewise. * testsuite/20_util/common_type/requirements/sfinae_friendly_1.cc: Adjust. Index: testsuite/20_util/common_type/requirements/sfinae_friendly_1.cc =================================================================== --- testsuite/20_util/common_type/requirements/sfinae_friendly_1.cc (revision 192306) +++ testsuite/20_util/common_type/requirements/sfinae_friendly_1.cc (working copy) @@ -172,7 +172,7 @@ static_assert(is_type, int>(), ""); static_assert(is_type, int>(), ""); static_assert(is_type, S>(), ""); -static_assert(is_type, S>(), ""); +static_assert(is_type, const S>(), ""); static_assert(is_type, std::initializer_list>, std::initializer_list>(), ""); static_assert(is_type, B>(), ""); @@ -188,10 +188,10 @@ static_assert(is_type, void>(), ""); static_assert(is_type, void>(), ""); static_assert(is_type, int>(), ""); -static_assert(is_type, int>(), ""); +static_assert(is_type, int&>(), ""); static_assert(is_type, int>(), ""); -static_assert(is_type, U>(), ""); -static_assert(is_type, U>(), ""); +static_assert(is_type, const U>(), ""); +static_assert(is_type, U&>(), ""); static_assert(is_type, U>(), ""); static_assert(is_type, int D::*>(), ""); static_assert(is_type, int D::*>(), ""); @@ -204,14 +204,14 @@ static_assert(is_type, int*>(), ""); static_assert(is_type, const int*>(), ""); -static_assert(is_type, void(*)()>(), ""); -static_assert(is_type, void(*)()>(), ""); +static_assert(is_type, void(&)()>(), ""); +static_assert(is_type, void(&)()>(), ""); static_assert(is_type, - void(*)()>(), ""); + void(&)()>(), ""); static_assert(is_type, - void(*)()>(), ""); + void(&)()>(), ""); static_assert(is_type, - void(*)()>(), ""); + void(&)()>(), ""); static_assert(is_type, int>, int>(), ""); static_assert(is_type, ImplicitTo>, ImplicitTo>(), ""); @@ -222,7 +222,7 @@ static_assert(is_type, decltype(lmd1)>(), ""); static_assert(is_type, - decltype(lmd1)>(), ""); + decltype(lmd1)&>(), ""); static_assert(is_type, void(*)(int, double)>(), ""); static_assert(is_type, void*>(), ""); @@ -237,9 +237,9 @@ int (B::*)() const>(), ""); static_assert(is_type, const int B::*>(), ""); -static_assert(is_type, Abstract>(), ""); -static_assert(is_type, Ukn>(), ""); -static_assert(is_type, B&>, B>(), ""); +static_assert(is_type, Abstract&>(), ""); +static_assert(is_type, Ukn&>(), ""); +static_assert(is_type, B&>, B&>(), ""); static_assert(is_type&, B&&>, B>(), ""); static_assert(is_type, const Abstract*>(), ""); @@ -328,7 +328,7 @@ static_assert(is_type, decltype(local_lmd1)>(), ""); static_assert(is_type, decltype(local_lmd1)>(), ""); + decltype(local_lmd1)&>, decltype(local_lmd1)&>(), ""); static_assert(!has_type>(), ""); Index: testsuite/20_util/common_type/requirements/typedefs-1.cc =================================================================== --- testsuite/20_util/common_type/requirements/typedefs-1.cc (revision 192306) +++ testsuite/20_util/common_type/requirements/typedefs-1.cc (working copy) @@ -105,7 +105,7 @@ COMMON_TYPE_TEST_ALL_2(int, int, int, 1); COMMON_TYPE_TEST_ALL_2(int, double, double, 2); COMMON_TYPE_TEST_2(NO_CV, A, A, A, 3); - COMMON_TYPE_TEST_2(const, A, A, A, 4); + COMMON_TYPE_TEST_2(const, A, A, const A, 4); COMMON_TYPE_TEST_2(NO_CV, B, A, A, 5); } Index: include/std/type_traits =================================================================== --- include/std/type_traits (revision 192306) +++ include/std/type_traits (working copy) @@ -1792,9 +1792,9 @@ struct __do_common_type_impl { template - static __success_type() : std::declval<_Up>()) - >::type> _S_test(int); + static __success_type() + : std::declval<_Up>())> _S_test(int); template static __failure_type _S_test(...);