Message ID | 20230326043032.11096-3-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 b10csp747667vqo; Sat, 25 Mar 2023 21:33:22 -0700 (PDT) X-Google-Smtp-Source: AKy350apSrLGb/10pUgjIo7GKjhecvUdPcpytGvOvWX689N8a1yHbvHTVXsPObxaUffpAW6fXdwl X-Received: by 2002:a05:6402:1002:b0:501:c547:2135 with SMTP id c2-20020a056402100200b00501c5472135mr7501997edu.36.1679805202201; Sat, 25 Mar 2023 21:33:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679805202; cv=none; d=google.com; s=arc-20160816; b=v/t1mrBd69UdVa1TtMZA+6xcnODrAJF00QFv0E+9PWHc/VB/FlR/+c/KouMakSFVRF ZAt7eKJRCO7sksdLXg/TcwU6N/X3SfX5YrYGCWKBJ+Kp6Y3NZ9tn3XLfUY9ApsRqcuLY kAiZXKL32exers/DUkYy4qILb1k/FadBnIDS3Vyu/AAlq+ziok2vP9yqi0f8zhHTzaDO s1ClakaDG7R1BZL9lkUEjW21i7IodDrJOp3EZ3lQGg6l2N/+Wgtfc98ic85YqmFlGQbm droKOEpwZBt3Vv3OVxwLCw59yuDy/mHmySD1A0h3ugfT9jyyAq2EHr7Ga0lcYwUYKwfj 8bCQ== 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=4zrZyB1zbEnVwSSdh8XJaqCcaf0J30tW3G7P66vpp00=; b=XGisoWdbvO1CAjKhw4rKn+Tz56xL6u5kJlAiCbLhvl4lR5lCy2zuDJQ7cnMlPSwQPE JaJo6EKnVkEzkNA/ZIPR9rLryI5hORE+lMwPoBqFoKlnM1rPo1lhCJ6mfyhml4Zma0Rc wOylY4aTP4wsrhjmiiXUFcbtkMeTGLersvvtyk/m+OZgGt0yKxMsiY5B80Ow3AmESpGB /9z9E7grCbaKrM6h7wg+prc9SEw/vQ/NSsHnxKa9U3GbFj/XtIwwTSENN42AO33SmzZ5 cDHxVKqc2BBHk1JzuD4Fx3JSFWy25AJfP5w1qvUE/l2nugLoMFRKeo50JzcauHJr6C/F 8GYg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=U9U5Xuvm; 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 q15-20020a056402040f00b00502259d2a96si3900282edv.604.2023.03.25.21.33.21 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 25 Mar 2023 21:33:22 -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=U9U5Xuvm; 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 401813870889 for <ouuuleilei@gmail.com>; Sun, 26 Mar 2023 04:32:03 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 401813870889 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1679805123; bh=4zrZyB1zbEnVwSSdh8XJaqCcaf0J30tW3G7P66vpp00=; 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=U9U5Xuvm5YssaITXU7z6iD4qWwrXsJcAQouhjjmOA2G+xlnHVoj+pZ1XXL90XkE84 R/5rInaVggnWw5szj0G9GPTmS8KY1+sQMw+4MUc4/UNPRzUX/+uEm4Wc2AnZTRhgy/ wtacP0XLHLKiAyLZ324f2Mk8DK8T6ppbY+X7f7J4= 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 CA5143855580; Sun, 26 Mar 2023 04:31:15 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org CA5143855580 Received: from pps.filterd (m0247479.ppops.net [127.0.0.1]) by mx0a-00641c01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 32Q3fU0e016086; Sun, 26 Mar 2023 04:31:15 GMT Received: from mxout24.cac.washington.edu (mxout24.cac.washington.edu [140.142.234.158]) by mx0a-00641c01.pphosted.com (PPS) with ESMTPS id 3pjajq0s08-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sun, 26 Mar 2023 04:31:15 +0000 Received: from smtp.washington.edu (smtp.washington.edu [140.142.234.157]) by mxout24.cac.washington.edu (8.14.4+UW20.07/8.14.4+UW22.04) with ESMTP id 32Q4V7gM031630 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sat, 25 Mar 2023 21:31:07 -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 32Q4UoQC026410 (version=TLSv1.2 cipher=DHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT); Sat, 25 Mar 2023 21:31:07 -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 02/10] libstdc++: use new built-in trait __is_reference for std::is_reference Date: Sat, 25 Mar 2023 21:30:24 -0700 Message-Id: <20230326043032.11096-3-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: mEsVIpm_H6iEx0CAWzjYhSSepfDeppPf X-Proofpoint-GUID: mEsVIpm_H6iEx0CAWzjYhSSepfDeppPf 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 lowpriorityscore=0 clxscore=1015 bulkscore=0 priorityscore=1501 mlxlogscore=832 malwarescore=0 suspectscore=0 adultscore=0 impostorscore=0 spamscore=0 phishscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2303200000 definitions=main-2303260034 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?1761403419712597188?= X-GMAIL-MSGID: =?utf-8?q?1761403419712597188?= |
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_reference to dispatch to new built-in trait
__is_reference.
libstdc++-v3/ChangeLog:
* include/std/type_traits (is_reference): Use __is_reference built-in
trait.
Signed-off-by: Ken Matsui <kmatsui@cs.washington.edu>
---
libstdc++-v3/include/std/type_traits | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/libstdc++-v3/include/std/type_traits b/libstdc++-v3/include/std/type_traits index 2bd607a8b8f..58a732735c8 100644 --- a/libstdc++-v3/include/std/type_traits +++ b/libstdc++-v3/include/std/type_traits @@ -639,6 +639,12 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION // Composite type categories. /// is_reference +#if __has_builtin(__is_reference) + template<typename _Tp> + struct is_reference + : public __bool_constant<__is_reference(_Tp)> + { }; +#else template<typename _Tp> struct is_reference : public false_type @@ -653,6 +659,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION struct is_reference<_Tp&&> : public true_type { }; +#endif /// is_arithmetic template<typename _Tp>