From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ua1-x931.google.com (mail-ua1-x931.google.com [IPv6:2607:f8b0:4864:20::931]) by sourceware.org (Postfix) with ESMTPS id 0A5EB3857C71 for ; Mon, 20 Mar 2023 07:31:15 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 0A5EB3857C71 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=cs.washington.edu Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=cs.washington.edu Received: by mail-ua1-x931.google.com with SMTP id m5so7186174uae.11 for ; Mon, 20 Mar 2023 00:31:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cs.washington.edu; s=goo201206; t=1679297474; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=semrOB/4+/mdVMywGtTACWtSzYbfInIA0uF9XEACvPE=; b=SozgFZrvcf0YPddvhSn+ylOtba3Wyti2IJDs1eRz6ZmKw6nXLKLhFaSEj/VKvjKClg vS1yIgNaFOxhHkWlRcIPK/j1AknQuobLNN1WSLgJFzH/USpETw6ADB4Y7H7QAtI4vqfT wxico9KbEPRky8Bn3pZxZCmns6zHeZ8hQZs/I= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679297474; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=semrOB/4+/mdVMywGtTACWtSzYbfInIA0uF9XEACvPE=; b=QdQMxrQ1ScRmTLU86K0CetKIvjg4faTt+v5nP5ntTix3Jnh1gSWZ+qh0WlA6qaFhZs Rg/luyAcdTuyAaaVmaLgJWoLFN2o9Ba7ZIfgVTGJB56CvKRyCyOdrZ65dfZ6sqsuugoY i9qUTlGhfB0Vhom8gS1HFkI2TgVYyzE7va+M5fVfc3/gzXRGt5DdWeTnJB9pLSAgTP3f MeKjYfarBPHY9WzkJr/Dk6mRl5dQ7Pg8UaJUNwURlVTRNaDAzgwPaCVJSZU3y0iSBgsF 61TEyiLKMonnZ9nrt9yBTuGYjAXzw0uv7em6ksjZ6sj5tMwZiBac1McVAkBUPueEOZ/P Zlkw== X-Gm-Message-State: AO0yUKUQMFSGuV6V6Zorgbd1OhlNmUPzfhfAxvGh1yShj3do7FkO11h5 0CxWfZwKCjHwGFdFLz1GCwvfbxHu9f2ghgDiRe6g2Q== X-Google-Smtp-Source: AK7set/LDXMyH68zDSmmo4fnZZ3qB6S6Bw8UjLlmENXWaXSoRFiNTM7b/YEZZglrkXZ3t+JiQqMPDAJRgIqo9Tzuffs= X-Received: by 2002:ab0:1006:0:b0:68e:33d7:7e6b with SMTP id f6-20020ab01006000000b0068e33d77e6bmr3303605uab.1.1679297474372; Mon, 20 Mar 2023 00:31:14 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Ken Matsui Date: Mon, 20 Mar 2023 00:31:03 -0700 Message-ID: Subject: Re: [PATCH] libstdc++: use new built-in trait __remove_pointer To: gcc-patches@gcc.gnu.org Cc: Patrick Palka , libstdc++@gcc.gnu.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-10.5 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,GIT_PATCH_0,RCVD_IN_DNSWL_NONE,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 List-Id: CCing libstdc++@gcc.gnu.org. On Sun, Mar 19, 2023 at 7:53=E2=80=AFPM Ken Matsui wrote: > > libstdc++-v3/ChangeLog: > > * include/std/type_traits (is_reference): Use __remove_pointer built-in t= rait. > > --- > diff --git a/libstdc++-v3/include/std/type_traits > b/libstdc++-v3/include/std/type_traits > index 2bd607a8b8f..cba98091aad 100644 > --- a/libstdc++-v3/include/std/type_traits > +++ b/libstdc++-v3/include/std/type_traits > @@ -2025,17 +2025,23 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION > > template > struct __remove_pointer_helper > - { typedef _Tp type; }; > + { using type =3D _Tp; }; > > template > struct __remove_pointer_helper<_Tp, _Up*> > - { typedef _Up type; }; > + { using type =3D _Up; }; > > /// remove_pointer > +#if __has_builtin(__remove_pointer) > + template > + struct remove_pointer > + { using type =3D __remove_pointer(_Tp); }; > +#else > template > struct remove_pointer > : public __remove_pointer_helper<_Tp, __remove_cv_t<_Tp>> > { }; > +#endif > > template > struct __add_pointer_helper