https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115497
Bug ID: 115497
Summary: __is_pointer doesn't compile with clang since
014879ea4c86b3b8ab6b61a1226ee5b31e816c8b
Product: gcc
Version: 15.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: libstdc++
Assignee: unassigned at gcc dot gnu.org
Reporter: mital at mitalashok dot co.uk
Target Milestone: ---
In libstdc++-v3/include/bits/cpp_type_traits.h, `__is_pointer` is both used as
a unary type trait and the name of a template struct. After it is a struct
template's name, Clang no longer parses it as a builtin and `inline constexpr
bool is_pointer_v = __is_pointer(_Tp);` in libstdc++-v3/include/std/type_traits
fails to compile.
This only happens if cpp_type_traits.h is included before type_traits, which
unfortunately happens with this program: https://godbolt.org/z/afbvddddK
#include <vector>
(Please advise if you think this is a Clang bug, how libstdc++ expects these
type trait names to be parsed)