https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110000
Bug ID: 110000 Summary: GCC should implement exclude_from_explicit_instantiation Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: nikolasklauser at berlin dot de Target Milestone: --- `exclude_from_explicit_instantiation` is an attribute implemented by clang. It tells the compiler that a function should not be part of an explicit instantiation. This allows libraries to have greater control over which functions are part of their ABI and which aren't. It is used extensively in libc++ to keep the ABI surface as small as possible. Currently, libc++ uses always_inline if exclude_from_explicit_instantiation isn't available, resulting in almost every function in the library being declared as always_inline. Replacing always_inline with exclude_from_explicit_instantiation would approximately halve the time it takes to run the libc++ test suite with GCC. (removing always_inline brings the time down to about the same as clang takes)