You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I have a template class in the global module fragment with a template class friend, and the class is instantiated inside a module, the friend declaration of the class appears to get attached to the module. This results in an error if two such modules (or module fragments) do this and one imports the other.
In module 'module1' imported from /app/module2.cppm:4:
test.h:4:16: error: declaration 'Test' attached to named module 'module1' cannot be attached to other modules
4 | friend class Test;
| ^
test.h:2:8: note: also found
2 | struct Test {
| ^