[libcxx-commits] [libcxx] [libc++] Introduce ABI sensitive areas to avoid requiring _LIBCPP_HIDE_FROM_ABI everywhere (PR #131156)

Derek Schuff via libcxx-commits libcxx-commits at lists.llvm.org
Wed May 21 14:41:39 PDT 2025


dschuff wrote:

> I think that @philnik777 might be correct here - the C++ standard does permit specialization of template types for UDTs. That is defining and exporting `std::hash`, `std::swap`, etc would be something that we should assume that the user is doing.

I agree that this type specialization is something users would be doing; although it's not clear to me what you're implying about what we should do now. @philnik777 clearly doesn't think that the new behavior where such specializations can't be exported by default is a problem.

Speaking of which, is there a way to change the visibility from the namespace scope (i.e. on `namespace std`), to avoid having to add the visibility attribute to every specialization? If I understand your previous link (https://godbolt.org/z/hGGhTG6f3) it looks like your example does that in clang, but not in gcc.

https://github.com/llvm/llvm-project/pull/131156


More information about the libcxx-commits mailing list