[Bug c++/92271] New: for consistency, __is_same_as should be named __is_same
richard-gccbugzilla at metafoo dot co.uk
gcc-bugzilla@gcc.gnu.org
Tue Oct 29 21:31:00 GMT 2019
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92271
Bug ID: 92271
Summary: for consistency, __is_same_as should be named
__is_same
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: richard-gccbugzilla at metafoo dot co.uk
Target Milestone: ---
The convention for type trait builtins adopted by essentially every C++
compiler vendor is to expose std::SOME_TRAIT<A, B, C>::value as __SOME_TRAIT(A,
B, C).
GCC violates this convention in one case: std::is_same<A, B>::value is exposed
as __is_same_as(A, B) rather than as __is_same(A, B).
For consistency and code portability, I suggest that GCC accepts __is_same as a
synonym for __is_same_as. (FWIW, Clang uses the name __is_same here, but will
soon accept __is_same_as for GCC compatibility.)
More information about the Gcc-bugs
mailing list