https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115497

Richard Smith <richard-gccbugzilla at metafoo dot co.uk> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |richard-gccbugzilla@metafoo
                   |                            |.co.uk

--- Comment #13 from Richard Smith <richard-gccbugzilla at metafoo dot co.uk> 
---
(In reply to Jonathan Wakely from comment #10)
> The only foolproof fix would be to rename the __is_pointer class template.

Yes, given that Clang treats this identifier as a keyword, the best solution
would be for libstdc++ to stop using it as a type name. We have an awful hack
in Clang to support libstdc++ doing this, and it'd be great to remove that
eventually. (I apologize, we should have made this request years ago when we
added the hack.)

As is evidenced in this bug, this hack was only made to be good enough to
support libstdc++ as it existed at the time. I'm not really sure what behavior
one would expect from `__is_pointer(_Tp)`, given that it can parse as a type
(treating `__is_pointer` as a placeholder for CTAD, which is semantically
invalid in this context only because we can't perform CTAD here). We could
extend our hack to support this too, but doing so is really a losing
proposition.

In general, we seem to have organically adopted the convention that
`std::blah<...>` type traits correspond to `__blah` keywords, so it'd be great
if libstdc++ didn't use any of those identifiers as type names.

Reply via email to