Am Mo., 10. Juli 2023 um 07:24 Uhr schrieb Ken Matsui via Libstdc++ <libstd...@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 <kmat...@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