From: "Daniel Krügler" <daniel.kruegler@gmail.com>
To: Ken Matsui <kmatsui@gcc.gnu.org>
Cc: gcc-patches@gcc.gnu.org, libstdc++@gcc.gnu.org
Subject: Re: [PATCH 2/2] libstdc++: use new built-in trait __is_pointer
Date: Mon, 10 Jul 2023 07:32:55 +0200 [thread overview]
Message-ID: <CAGNvRgA+TxWS4KfPAqWu_aSvZe3SPQuL8jUWbK48D3Wkzzc2SA@mail.gmail.com> (raw)
In-Reply-To: <20230710052310.48116-2-kmatsui@gcc.gnu.org>
Am Mo., 10. Juli 2023 um 07:24 Uhr schrieb Ken Matsui via Libstdc++
<libstdc++@gcc.gnu.org>:
>
> This patch lets libstdc++ use new built-in trait __is_pointer.
>
> libstdc++-v3/ChangeLog:
>
> * include/std/type_traits (is_pointer): Use __is_pointer
> built-in trait.
> (is_pointer_v): Likewise.
>
> Signed-off-by: Ken Matsui <kmatsui@gcc.gnu.org>
> ---
> libstdc++-v3/include/std/type_traits | 9 ++++++++-
> 1 file changed, 8 insertions(+), 1 deletion(-)
>
> diff --git a/libstdc++-v3/include/std/type_traits b/libstdc++-v3/include/std/type_traits
> index 0e7a9c9c7f3..d83db98403b 100644
> --- a/libstdc++-v3/include/std/type_traits
> +++ b/libstdc++-v3/include/std/type_traits
> @@ -515,6 +515,13 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
> struct is_array<_Tp[]>
> : public true_type { };
>
> + /// is_pointer
> +#if __has_builtin(__is_pointer)
> + template<typename _Tp>
> + struct is_pointer
> + : public __bool_constant<__is_pointer(_Tp)>
> + { };
> +#else
> template<typename>
> struct __is_pointer_helper
> : public false_type { };
> @@ -523,11 +530,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
> struct __is_pointer_helper<_Tp*>
> : public true_type { };
>
> - /// is_pointer
> template<typename _Tp>
> struct is_pointer
> : public __is_pointer_helper<__remove_cv_t<_Tp>>::type
> { };
> +#endif
>
> /// is_lvalue_reference
> template<typename>
> --
> 2.41.0
Shouldn't this adjust is_pointer_v as well?
Thanks,
- Daniel
next prev parent reply other threads:[~2023-07-10 5:33 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-10 5:23 [PATCH 1/2] c++, libstdc++: implement __is_pointer built-in trait Ken Matsui
2023-07-10 5:23 ` [PATCH 2/2] libstdc++: use new built-in trait __is_pointer Ken Matsui
2023-07-10 5:32 ` Daniel Krügler [this message]
2023-07-10 5:34 ` Ken Matsui
2023-07-10 5:38 ` [PATCH v2 1/2] c++, libstdc++: implement __is_pointer built-in trait Ken Matsui
2023-07-10 5:38 ` [PATCH v2 2/2] libstdc++: use new built-in trait __is_pointer Ken Matsui
2023-07-10 5:50 ` [PATCH v2 1/2] c++, libstdc++: implement __is_pointer built-in trait Ken Matsui
2023-07-12 10:01 ` Jonathan Wakely
2023-07-12 20:42 ` Ken Matsui
2023-07-13 1:11 ` [PATCH v3 1/2] c++, libstdc++: Implement " Ken Matsui
2023-07-13 1:11 ` [PATCH v3 2/2] libstdc++: Use new built-in trait __is_pointer Ken Matsui
2023-07-13 1:13 ` [PATCH v3 1/2] c++, libstdc++: Implement __is_pointer built-in trait Ken Matsui
2023-07-13 1:15 ` Ken Matsui
2023-07-13 3:16 ` [PATCH v4 " Ken Matsui
2023-07-13 3:16 ` [PATCH v4 2/2] libstdc++: Use new built-in trait __is_pointer Ken Matsui
2023-07-13 3:19 ` [PATCH v5 1/2] c++, libstdc++: Implement __is_pointer built-in trait Ken Matsui
2023-07-13 3:19 ` [PATCH v5 2/2] libstdc++: Use new built-in trait __is_pointer Ken Matsui
2023-07-13 20:48 ` [PATCH v6 1/2] c++, libstdc++: Implement __is_pointer built-in trait Ken Matsui
2023-07-13 20:48 ` [PATCH v6 2/2] libstdc++: Use new built-in trait __is_pointer Ken Matsui
2023-09-01 13:00 ` [PING][PATCH " Ken Matsui
2023-07-13 9:21 ` [PATCH v2 1/2] c++, libstdc++: implement __is_pointer built-in trait Jonathan Wakely
2023-07-13 20:04 ` Ken Matsui
2023-07-14 10:48 ` Jonathan Wakely
2023-07-14 10:49 ` Jonathan Wakely
2023-07-14 19:55 ` Ken Matsui
2023-07-12 4:40 ` [PATCH " François Dumont
2023-07-12 9:47 ` Jonathan Wakely
2023-07-12 9:48 ` Jonathan Wakely
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAGNvRgA+TxWS4KfPAqWu_aSvZe3SPQuL8jUWbK48D3Wkzzc2SA@mail.gmail.com \
--to=daniel.kruegler@gmail.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=kmatsui@gcc.gnu.org \
--cc=libstdc++@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).