Open
Description
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.