[libcxx-commits] [PATCH] D150896: [libc++] Apply _LIBCPP_EXCLUDE_FROM_EXPLICIT_INSTANTIATION only in classes that we have instantiated externally

Jonathan Wakely via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Fri May 26 13:03:12 PDT 2023


jwakely added a comment.

In D150896#4376904 <https://reviews.llvm.org/D150896#4376904>, @ldionne wrote:

> - or we drop the guarantee that users can do explicit instantiations on GCC (or if they do, then we don't guarantee ABI stability for them)

This seems acceptable to me.

> This is a mess. @jwakely Do you think there's any chance we could get GCC to add this attribute? The attribute is pretty simple, it basically excludes the marked member functions from any explicit instantiation or explicit instantiation declaration.

Dunno, file a bugzilla and find out :-)

Why is this only a problem for explicit instantiations? If users have implicit instantiations of members of `std::vector`, isn't there also an ABI stability requirement there? If two translation units each have an implicit instantiation, but with different ABI semantics, the linker could pick either of the definitions. That could be incompatible with one of the TUs.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D150896/new/

https://reviews.llvm.org/D150896



More information about the libcxx-commits mailing list