https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114917
Bug ID: 114917 Summary: [modules] Explicit specialisations in export namespace not permitted Product: gcc Version: 15.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: nshead at gcc dot gnu.org Target Milestone: --- Since r15-84-g79420dd3441458 we now incorrectly reject the following modules example: export module M; export namespace ns { template <typename T> void foo() {} template <> void foo<int>() {} } Relatedly, we also incorrectly accept (and have since at least GCC 4.1): extern "C++" namespace ns { struct Incomplete; Incomplete bar; } for similar reasons: the contents of the namespace are still considered be an "unbraced" context of the extern "C++" and so bar is implicitly considered to be declared extern. See also [dcl.link] p8.