From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ua1-x933.google.com (mail-ua1-x933.google.com [IPv6:2607:f8b0:4864:20::933]) by sourceware.org (Postfix) with ESMTPS id 45A58385B526 for ; Mon, 20 Mar 2023 07:31:15 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 45A58385B526 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-x933.google.com with SMTP id x33so7193249uaf.12 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=SsFPL7jE22y5FLobIPzTF19i5kxLLCGNJL9F9BNljghK7olB9J6AuFitVG0gHoEWQj p2DcaCTp+BQlCLpJE2qp7Te31oYLtgzfkO9eKvyFdkhMc5Tv9fmB8BGmMgIj4TGa8+mz yEmeFDcUxWRZTv4lWTo521WQaNLj2wPfrDzuF9ScC1dK0JCaLivfxhKEPMMl4qxMfS+9 lwMxeeYLxer/Y6tdbvhC0SYPGmO54WeC7LR5pNg3JHiiz3DIVONJ83VrsiAm6vh99smM bK0skeoHcD6044+y6Hp8DeH+8p77Sbty3FG4H9t6pJ6rGszAMKh+H9xXCA8liZTz0709 Nf8g== X-Gm-Message-State: AO0yUKWSxw1IuzX4PYLzZrGpZQGMr/BFrchfCQ06mBtj3LpwRLL+xxX9 B2/S4ORApERZ3IF/Q1uEAsmC4SyCqjKakE0OrynI1NKzkzI0HSjjjDw= 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=-12.8 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=unavailable 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