-
Notifications
You must be signed in to change notification settings - Fork 12k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
defining struct/class code and finishing impl later in an export { } block #61890
Comments
@llvm/issue-subscribers-clang-modules |
In this case it refers to the global namespace. The standard says we shouldn't export things which are not in namespace scope. I think the current behavior may not be wrong simply. Maybe MSVC is smarter in this case. |
so that namespace association should fall through based on it being exported at expression of struct/class (because it cannot be expressed at the membership level)? just trying to wrap head around. with most of these things it seems obvious to post an issue at the time and then I find the redundancies in a way. still, it seems lossless to have a little fix in place for that. |
I am not sure if I understand your question well. But the export block is a transparent context. In other words, it doesn't have semantical meaning to the process of lookups. Or you can think it is orthogonal with namespaces. |
Thank you. If I find where this is applied, would a PR be acceptable to fix? |
No... I know where this is applied. I mean this may not be good to be fixed... Since we don't want the users to think they can export the entities which are not at namespace scope. This is by design. |
version / target:
my issue:
...putting it all in
export { }
works on MSVC. its declared exported above and finished inside. What namespace would it be referring to? if theexport { }
creates the namespace its certainly inside it in the error case?The text was updated successfully, but these errors were encountered: