On Mon, 10 Jul 2023 at 06:24, Ken Matsui via Libstdc++ <libstd...@gcc.gnu.org> wrote: > > This patch implements built-in trait for std::is_pointer. > > gcc/cp/ChangeLog: > > * cp-trait.def: Define __is_pointer. > * constraint.cc (diagnose_trait_expr): Handle CPTK_IS_POINTER. > * semantics.cc (trait_expr_value): Likewise. > (finish_trait_expr): Likewise. > > gcc/testsuite/ChangeLog: > > * g++.dg/ext/has-builtin-1.C: Test existence of __is_pointer. > * g++.dg/ext/is_pointer.C: New test. > * g++.dg/tm/pr46567.C (__is_pointer): Rename to ... > (____is_pointer): ... this. > * g++.dg/torture/20070621-1.C: Likewise. > * g++.dg/torture/pr57107.C: Likewise. > > libstdc++-v3/ChangeLog: > > * include/bits/cpp_type_traits.h (__is_pointer): Rename to ... > (____is_pointer): ... this.
Please pick another name, ____is_pointer is not OK for the library trait. (It might be OK for the g++.dg tests, I have no opinion on that.) You could use __is_pointer_type or __is_ptr, I don't really mind which (it's only used in two places).