Message ID | 20230330183911.12640-8-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 b10csp63667vqo; Thu, 30 Mar 2023 11:49:06 -0700 (PDT) X-Google-Smtp-Source: AKy350bclzrn3772J8Rlpnp6ln3q7/RHbwql6/RGeEVMMGZfHmX5sfxap4sMop4eneSt65mSdx7v X-Received: by 2002:a17:906:aeda:b0:931:20fd:3d09 with SMTP id me26-20020a170906aeda00b0093120fd3d09mr8097576ejb.17.1680202146683; Thu, 30 Mar 2023 11:49:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680202146; cv=none; d=google.com; s=arc-20160816; b=E3IdjphqPrtdb90SfjV1qMarxnwsaApC15V5PVlqFT3n3Kr44dFYvyL1gBT4jaISQv FjZydAh2c4NLajiGwUz/ZCohURFuzKZ9rCrTlmOOwxHfIPQapnQAo3GOToVE+MDFGzSe imEdaOitPInBPYWsokHlaJcBdEktNpfnlQ6bV48cVlBOCip0WCZvH7P0EcJhG7hVX36Q nF0OSPabvU8NG4d1fbiQG+bXP1xhE3XIvJDW8WHcZUuLIJ67FVCDkszT6YjmNE5BbPIm B4Lzraz/h5HHDHtDpSJM06Hrzvd5bsWxk4f4nF8sdcW3gAWhnogQvlrQMoh8vphNvRTi 741A== 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=oi4LdL3NLWNUBLK9aPQwu2XXbgkxoKxuJroyNVZyEa8=; b=XHjjPKg/dHxk0HgPaveUju26GrOa1Z6BUTYp6wW2y3doRi2jJC1TY3J1OWplyofZwJ wScMigKmgjbTcdLS+ryhVtGYYe1bC6fqbc8q8B4VapjtaYOa7DXbC9ZbG+CwBBeOM5fK mXDp4UhIOi8V3dugStRm4tBMacrK+xXSQlKq7WFhRhYmjalD5b2C2nKgA27lIa56oksk zdaQ83Sf/w+oKr9ZHXw//GTTgh4Yd6XzHt+aQFhZs2m1W+lmQgaU7PogdVbP4W198EY5 8Bh9k5r4asps6mXExbe7akYmU0vRNITC/wqug/GRDy7lBbH3l+dmQyGRdBQJCFFrtLmB 9BTw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=drFw4mhd; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 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 (ip-8-43-85-97.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id t22-20020a1709060c5600b0092a8aa23062si234890ejf.571.2023.03.30.11.49.06 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Mar 2023 11:49:06 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=drFw4mhd; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 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 A0BA33853D3E for <ouuuleilei@gmail.com>; Thu, 30 Mar 2023 18:43:59 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A0BA33853D3E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1680201839; bh=oi4LdL3NLWNUBLK9aPQwu2XXbgkxoKxuJroyNVZyEa8=; 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=drFw4mhdXKeyiW+ns5wJPf/TX3wwg5c3krxCv5/cX0CSt9x4w/prD7cOODE8kxSnf wVxd5usBItjzv2PdaOJDqkZaMcEiYysjJNA7oQ3pz/kgU1nERyAZgr/4p/Spt2gxuh 5uxvXazL8GdwyNTDwqY5fIcO+15RTQfHTfV+/uJw= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mx0b-00641c01.pphosted.com (mx0b-00641c01.pphosted.com [205.220.177.146]) by sourceware.org (Postfix) with ESMTPS id 711AD3858025; Thu, 30 Mar 2023 18:41:03 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 711AD3858025 Received: from pps.filterd (m0247481.ppops.net [127.0.0.1]) by mx0a-00641c01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 32UIdSNi009618; Thu, 30 Mar 2023 18:41:03 GMT Received: from mxout21.s.uw.edu (mxout21.s.uw.edu [140.142.32.139]) by mx0a-00641c01.pphosted.com (PPS) with ESMTPS id 3pnedqh56d-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 30 Mar 2023 18:41:02 +0000 Received: from smtp.washington.edu (smtp.washington.edu [140.142.234.157]) by mxout21.s.uw.edu (8.14.4+UW20.07/8.14.4+UW22.04) with ESMTP id 32UIeZBv001556 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 30 Mar 2023 11:40:35 -0700 X-Auth-Received: from localhost.localdomain ([10.18.194.223]) (authenticated authid=kmatsui) by smtp.washington.edu (8.16.1+UW21.10/8.14.4+UW19.10) with ESMTPSA id 32UIdK7M001092 (version=TLSv1.2 cipher=DHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT); Thu, 30 Mar 2023 11:40:35 -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 v2 7/7] libstdc++: make std::is_object dispatch to new built-in traits Date: Thu, 30 Mar 2023 11:39:11 -0700 Message-Id: <20230330183911.12640-8-kmatsui@cs.washington.edu> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230330183911.12640-1-kmatsui@cs.washington.edu> References: <20230326043032.11096-1-kmatsui@cs.washington.edu> <20230330183911.12640-1-kmatsui@cs.washington.edu> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Proofpoint-GUID: Gr9e5l_L2IqB1LwYAddkj48mmFZt095F X-Proofpoint-ORIG-GUID: Gr9e5l_L2IqB1LwYAddkj48mmFZt095F 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-30_11,2023-03-30_03,2023-02-09_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 impostorscore=0 clxscore=1015 malwarescore=0 lowpriorityscore=0 adultscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2303200000 definitions=main-2303300147 X-Spam-Status: No, score=-14.2 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_STATUS, RCVD_IN_DNSWL_LOW, 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?1761819646267281943?= |
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 30, 2023, 6:39 p.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;