Message ID | 20230323004207.34784-2-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:a5d:604a:0:0:0:0:0 with SMTP id j10csp2650151wrt; Wed, 22 Mar 2023 17:44:07 -0700 (PDT) X-Google-Smtp-Source: AK7set+ugXmrurs70v4EvrB5dM6IJBJcHqliLLMxL+2c1mAIswbbapit4G8mG2XXBoC7VUkLYYfS X-Received: by 2002:a17:907:a4c3:b0:93a:219d:b167 with SMTP id vq3-20020a170907a4c300b0093a219db167mr8052308ejc.52.1679532247506; Wed, 22 Mar 2023 17:44:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679532247; cv=none; d=google.com; s=arc-20160816; b=QVVBpF39l1fiZuaemouN3fZlDzi6oMt2xZ8m28BAXnodDayZm9Ey1/p12+GHKGBmcQ WvpcgtjbiSAIUspSX3ZpCojsN18xoBnAs1ZqE4MrBJILhhXhKYqoY9fQRL3tjtb7r1lW O28b5DLXawwW/EybziRLLJKypNeGyCdPRLwYVgBQZruwVo8R68CXRN4rD8aasdpYwAex qN2cCG7KuRuhc/+bNkFLbWbnbJrK1yLiatPjZUiAD3PI83tBKqSj46iTtB+F2T/FstnF T+jh8V0fJIWs3J2aYc6bJJ74z6DeDOEZkoEENntQTu3yLs5i+xCfIOj4wt/b2up1Dkur WPEg== 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=WzUnqqHTZrFMssY8N5oTZTK02QnRPqC5uRRid6MUaWA=; b=UMoi5Z88rwfQQvG2Nv1cBCF0YCwiy8m1sKqQpRsLaEAXWw1hhtLsewXHTZJdKyErcT OH2Kr9jKcD/EShY4Y87Pn2rFLjpNYdWOk0wU58zBnE+r2P0xcP8cySqBRL4lAd1pXYDf poJboYQirHwYTzwiNT2WGTMzpJfOY4h7LNPvu15rmiZSegm/uBoZWWdRBFDSC6QVgWaH mrAveaG9OOkQVLxalYLUHjCrRg1p/1/gsOmCEjxv0ygcdnuAmfajAAIjaQsuZ+ksAluH QSAKsWWywg4zlFauTavHDpefjWNcoIzYiF3NLozx87BoGZJ8Wlkq5jgfsestZJn7kNKK YYOg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=Nf8AEkVA; 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 j15-20020a170906474f00b009307f8dba4dsi16878692ejs.897.2023.03.22.17.44.07 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Mar 2023 17:44:07 -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=Nf8AEkVA; 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 00B47385086E for <ouuuleilei@gmail.com>; Thu, 23 Mar 2023 00:44:01 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 00B47385086E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1679532241; bh=WzUnqqHTZrFMssY8N5oTZTK02QnRPqC5uRRid6MUaWA=; 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=Nf8AEkVAfJTzi3/KgLRdM+yslqJ5gs+F7EtA26bcoNTUJf369h5ezT4uwcK1c1EJD Yl9eayCKb5y2w25XfAAUSdZXVfS4Slo89tk35dRgl+jLrQZEhtvky1+wjIPyiNwy24 hHxwSbPukGgB9gKuJDF76ztu0rnyz9DJjNzstHuM= 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 1666C3850205; Thu, 23 Mar 2023 00:42:38 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 1666C3850205 Received: from pps.filterd (m0247477.ppops.net [127.0.0.1]) by mx0a-00641c01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 32N0dHpa032134; Thu, 23 Mar 2023 00:42:37 GMT Received: from mxout25.s.uw.edu (mxout25.s.uw.edu [140.142.234.175]) by mx0a-00641c01.pphosted.com (PPS) with ESMTPS id 3pg63p32ps-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 23 Mar 2023 00:42:37 +0000 Received: from smtp.washington.edu (smtp.washington.edu [128.208.60.132]) by mxout25.s.uw.edu (8.14.4+UW20.07/8.14.4+UW22.04) with ESMTP id 32N0gGal027609 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 22 Mar 2023 17:42:16 -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 32N0gFCt011404 (version=TLSv1.2 cipher=DHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT); Wed, 22 Mar 2023 17:42:15 -0700 X-UW-Orig-Sender: kmatsui@smtp.washington.edu To: jwakely@redhat.com Cc: gcc-patches@gcc.gnu.org, libstdc++@gcc.gnu.org, Ken Matsui <kmatsui@cs.washington.edu> Subject: [PATCH v2 2/2] libstdc++: use new built-in trait __is_unsigned Date: Wed, 22 Mar 2023 17:42:07 -0700 Message-Id: <20230323004207.34784-2-kmatsui@cs.washington.edu> X-Mailer: git-send-email 2.40.0 In-Reply-To: <CACb0b4kH22UaBgNiDgtepfgoodQsAQNiC=4riCvC0Wx9eV2h6g@mail.gmail.com> References: <CACb0b4kH22UaBgNiDgtepfgoodQsAQNiC=4riCvC0Wx9eV2h6g@mail.gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Proofpoint-ORIG-GUID: lk--JMqKOXLggeM9PWpkYXIQ6bjvU8hh X-Proofpoint-GUID: lk--JMqKOXLggeM9PWpkYXIQ6bjvU8hh 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-22_20,2023-03-22_01,2023-02-09_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 bulkscore=0 mlxscore=0 spamscore=0 phishscore=0 malwarescore=0 adultscore=0 impostorscore=0 suspectscore=0 lowpriorityscore=0 clxscore=1015 mlxlogscore=893 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2303150002 definitions=main-2303230003 X-Spam-Status: No, score=-14.6 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?1760996234805106576?= X-GMAIL-MSGID: =?utf-8?q?1761117205531349068?= |
Series |
[v2,1/2] c++: implement __is_unsigned built-in trait
|
|
Checks
Context | Check | Description |
---|---|---|
snail/gcc-patch-check | success | Github commit url |
Commit Message
Ken Matsui
March 23, 2023, 12:42 a.m. UTC
This patch lets libstdc++ use new built-in trait __is_unsigned. libstdc++-v3/ChangeLog: * include/std/type_traits (is_unsigned): Use __is_unsigned built-in trait. --- 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..8d5a05cd0a6 100644 --- a/libstdc++-v3/include/std/type_traits +++ b/libstdc++-v3/include/std/type_traits @@ -884,10 +884,17 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { }; /// is_unsigned +#if __has_builtin(__is_unsigned) + template<typename _Tp> + struct is_unsigned + : public __bool_constant<__is_unsigned(_Tp)> + { }; +#else template<typename _Tp> struct is_unsigned : public __and_<is_arithmetic<_Tp>, __not_<is_signed<_Tp>>>::type { }; +#endif /// @cond undocumented template<typename _Tp, typename _Up = _Tp&&>