-
Notifications
You must be signed in to change notification settings - Fork 15k
Closed as not planned
Closed as not planned
Copy link
Labels
clang:modulesC++20 modules and Clang Header ModulesC++20 modules and Clang Header ModuleswontfixIssue is real, but we can't or won't fix it. Not invalidIssue is real, but we can't or won't fix it. Not invalid
Description
module;
export module test_mod;
export {
struct test_me {
void test_method();
};
void test_me::test_method() { /// fatal error: cannot export 'test_method' as it is not at namespace scope [?]
printf("test");
}
}
// this works:
module;
export module test_mod;
export struct test_me {
void test_method();
};
void test_me::test_method() { /// works.
printf("test");
}
// this also works:
module;
export module test_mod;
export {
struct test_me {
void test_method();
};
}
void test_me::test_method() { /// works.
printf("test");
}version / target:
clang version 17.0.0 (https://github.com/llvm/llvm-project f66b9fe5876d670b38351c9a7efd90e793f35a30)
Target: arm64-apple-darwin22.3.0my issue:
...putting it all in export { } works on MSVC. its declared exported above and finished inside. What namespace would it be referring to? if the export { } creates the namespace its certainly inside it in the error case?
Metadata
Metadata
Assignees
Labels
clang:modulesC++20 modules and Clang Header ModulesC++20 modules and Clang Header ModuleswontfixIssue is real, but we can't or won't fix it. Not invalidIssue is real, but we can't or won't fix it. Not invalid