[libc++] std::type_index equality broken for anonymous namespace classes with same name with NonUnique implementation #79367
Labels
libc++
libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi.
llvm-project/libcxx/include/typeinfo
Line 117 in 6e4930c
With
_LIBCPP_TYPEINFO_COMPARISON_IMPLEMENTATION = 2
, classes in different anonymous namespace with the same name are considered equal. #44894 already reported this, but the issue was merely worked around for Apple builds.I believe libstdc++ handles this correctly by not doing the name comparison when it detects these sorts of anonymous namespace classes: https://github.com/gcc-mirror/gcc/blob/aedfdd340cbb4a97a8f6d432720a4df374c1e467/libstdc%2B%2B-v3/libsupc%2B%2B/typeinfo#L205.
The text was updated successfully, but these errors were encountered: