https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105515
Bug ID: 105515 Summary: const vector inside a module namespace. Error. Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: deco33000 at yandex dot com Target Milestone: --- Hi, when using this extremely reduced code: ---------- module; #include <vector> export module common_vals; using std::vector; export { namespace My_vals { const vector <unsigned> val{4209}; } } ---------- The error: error: ‘val’ is not a member of ‘My_vals’. Remove const and it works. With the traditional headers, const causes no issue. GCC 12.1.0 - Linux Thanks