Message ID | 20230326043032.11096-11-kmatsui@cs.washington.edu |
---|---|
State | Accepted |
Headers |
Return-Path: <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp749380vqo; Sat, 25 Mar 2023 21:40:13 -0700 (PDT) X-Google-Smtp-Source: AKy350bRkMBAG/cnE0iC+zX+0Eu6Z+NQKge+F23QqiXJyk7MB7u0QFqR+EESQTbBxpFmLskyXyyX X-Received: by 2002:a05:6402:20d:b0:4fa:c17d:8fdd with SMTP id t13-20020a056402020d00b004fac17d8fddmr6992422edv.34.1679805613563; Sat, 25 Mar 2023 21:40:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679805613; cv=none; d=google.com; s=arc-20160816; b=iQeSW2Oyq7CE+Jq92HJe0PNE76vGyrVgDoa9EoamvcULZXTnBxG/tSyI6IQIzExW2k BJr8T8zxZbz5BbvBkzOSi6K++w9yVo0NnSTDcMvfr8Ti+bQd6xHMxv4AfHLSwQyM/mZL 9/oio6sJbzVMjzpmDqDhjDRwIWIgAH6dm3qbLcwRSFHE2kO5NxdqdkSQ3X5tC0kk0mi1 Lqb8B6AV1Wxg4sfb4rU3AZWYh5ab1lg48g6fxL1uuxOCIQynZSD0JXnyMuvCW3hZ2hAU NCeYXqJwPq6kzYLyzL2xA/a3r5dvic9YO5ZI0i4aB6Dld48EsO4JSucCqAI/Fi1C42vg Nkrg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:from:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:dmarc-filter:delivered-to :dkim-signature:dkim-filter; bh=6oLbw2Cc0UrBwd9iSWcO/Dr5I+CLTMtEpZRT9GZaAhI=; b=KdPizkuMMnqy2buA+kzoTRCoOdtHNWiUppbLjakQ/gOG5RP269vAapnW1kcoQi4cr0 QG0nLwxsPO+SZ+0l5X2jeXY21JZlLxvnzOPl41Gy3RAsxzzWDo0vDlWBFAewtnReXz+h 5TZnzNk2aTfqJ4NXut2M2cW6u09TE+DKRrjIbs1bLOSqtsxcI+Ps7LeKy3FwCERXkPRs 9sW3bNTkGvBbg6uk306j3HkNUPIo8hpdQgsvVgNsmKgLIY58+TPSJACbX+R9B889Ymc+ snh9/0KEkVIHMwMOrVfGXBYHxna3VoOO/nlubPEZFcCLeVUnUaSa9Dy3cZ4TXdojp/Ch xCzQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b="E2hYd/49"; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id h11-20020aa7c60b000000b005021f0d5769si5890183edq.688.2023.03.25.21.40.13 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 25 Mar 2023 21:40:13 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b="E2hYd/49"; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 820EA3955CA4 for <ouuuleilei@gmail.com>; Sun, 26 Mar 2023 04:34:35 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 820EA3955CA4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1679805275; bh=6oLbw2Cc0UrBwd9iSWcO/Dr5I+CLTMtEpZRT9GZaAhI=; h=To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=E2hYd/4910NTJcESWvgoF05GewMLzLalnLzSUn1mUtzbeC1KcVwTEmrDO11CBo5oD y5ebN78mBkLZv67zF6GIGChSOiV1mrd5G3lqTCdk108d9IrymLIQ17j8TuwTYzL4XH aYngj/UJppU4cZXZgMDmi9i8kdjF64RNMWdpakVQ= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mx0a-00641c01.pphosted.com (mx0a-00641c01.pphosted.com [205.220.165.146]) by sourceware.org (Postfix) with ESMTPS id 3F3833850841; Sun, 26 Mar 2023 04:32:03 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 3F3833850841 Received: from pps.filterd (m0247471.ppops.net [127.0.0.1]) by mx0a-00641c01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 32Q4MO9L030619; Sun, 26 Mar 2023 04:32:02 GMT Received: from mxout25.s.uw.edu (mxout25.s.uw.edu [140.142.234.175]) by mx0a-00641c01.pphosted.com (PPS) with ESMTPS id 3pjacn0sy7-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sun, 26 Mar 2023 04:32:02 +0000 Received: from smtp.washington.edu (smtp.washington.edu [140.142.234.157]) by mxout25.s.uw.edu (8.14.4+UW20.07/8.14.4+UW22.04) with ESMTP id 32Q4VxId019035 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sat, 25 Mar 2023 21:31:59 -0700 X-Auth-Received: from localhost.localdomain ([10.154.74.245]) (authenticated authid=kmatsui) by smtp.washington.edu (8.16.1+UW21.10/8.14.4+UW19.10) with ESMTPSA id 32Q4UoQK026410 (version=TLSv1.2 cipher=DHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT); Sat, 25 Mar 2023 21:31:58 -0700 X-UW-Orig-Sender: kmatsui@smtp.washington.edu To: gcc-patches@gcc.gnu.org Cc: libstdc++@gcc.gnu.org, Ken Matsui <kmatsui@cs.washington.edu> Subject: [PATCH 10/10] libstdc++: make std::is_object dispatch to new built-in traits Date: Sat, 25 Mar 2023 21:30:32 -0700 Message-Id: <20230326043032.11096-11-kmatsui@cs.washington.edu> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230326043032.11096-1-kmatsui@cs.washington.edu> References: <20230326043032.11096-1-kmatsui@cs.washington.edu> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Proofpoint-ORIG-GUID: cQafx0HINPUW3tOxSy_IYZmuLAca8e3G X-Proofpoint-GUID: cQafx0HINPUW3tOxSy_IYZmuLAca8e3G X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.942,Hydra:6.0.573,FMLib:17.11.170.22 definitions=2023-03-24_11,2023-03-24_01,2023-02-09_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 malwarescore=0 mlxlogscore=999 spamscore=0 priorityscore=1501 mlxscore=0 lowpriorityscore=0 suspectscore=0 impostorscore=0 phishscore=0 bulkscore=0 clxscore=1015 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2303200000 definitions=main-2303260034 X-Spam-Status: No, score=-14.5 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_STATUS, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list <gcc-patches.gcc.gnu.org> List-Unsubscribe: <https://gcc.gnu.org/mailman/options/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=unsubscribe> List-Archive: <https://gcc.gnu.org/pipermail/gcc-patches/> List-Post: <mailto:gcc-patches@gcc.gnu.org> List-Help: <mailto:gcc-patches-request@gcc.gnu.org?subject=help> List-Subscribe: <https://gcc.gnu.org/mailman/listinfo/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe> From: Ken Matsui via Gcc-patches <gcc-patches@gcc.gnu.org> Reply-To: Ken Matsui <kmatsui@cs.washington.edu> Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1761403850642973368?= X-GMAIL-MSGID: =?utf-8?q?1761403850642973368?= |
Series |
c++, libstdc++: get std::is_object to dispatch to new built-in traits
|
|
Checks
Context | Check | Description |
---|---|---|
snail/gcc-patch-check | success | Github commit url |
Commit Message
Ken Matsui
March 26, 2023, 4:30 a.m. UTC
This patch gets std::is_object to dispatch to new built-in traits,
__is_function, __is_reference, and __is_void.
libstdc++-v3/ChangeLog:
* include/std/type_traits (is_object): Use new built-in traits,
__is_function, __is_reference, and __is_void.
Signed-off-by: Ken Matsui <kmatsui@cs.washington.edu>
---
libstdc++-v3/include/std/type_traits | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/libstdc++-v3/include/std/type_traits b/libstdc++-v3/include/std/type_traits index 98764685a39..5d50c55b70f 100644 --- a/libstdc++-v3/include/std/type_traits +++ b/libstdc++-v3/include/std/type_traits @@ -689,11 +689,20 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { }; /// is_object +#if __has_builtin(__is_function) && __has_builtin(__is_reference) \ + && __has_builtin(__is_void) + template<typename _Tp> + struct is_object + : public __bool_constant<!(__is_function(_Tp) || __is_reference(_Tp) || + __is_void(_Tp))> + { }; +#else template<typename _Tp> struct is_object : public __not_<__or_<is_function<_Tp>, is_reference<_Tp>, is_void<_Tp>>>::type { }; +#endif template<typename> struct is_member_pointer;