|
// ========================================================================== // |
describes the various ways of implementing type_info comparison.
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.