https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120824
--- Comment #1 from m.cencora at gmail dot com --- Exporting it as aliased type makes the module compile, but importers still cannot see it: $ cat posix.mod.cpp module; #include "sock_domain.h" export module posix; export { //using ::AF_INET; using SOCK_PROTOS = decltype(::AF_INET); } $ g++ -fmodules posix.mod.cpp use.cpp use.cpp: In function ‘int main()’: use.cpp:5:5: error: ‘AF_INET’ was not declared in this scope 5 | AF_INET; | ^~~~~~~ use.cpp:6:5: error: ‘AF_UNIX’ was not declared in this scope 6 | AF_UNIX; | ^~~~~~~