-
Notifications
You must be signed in to change notification settings - Fork 34
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
Add Linkage section #249
Add Linkage section #249
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the cases of external and internal linkage there's also a property where a declaration inherits the linkage of its encompassing declaration. For example:
namespace PublicStuff {
void Fn(int); // external linkage
class Obj {
void MemberFn(); // external linkage
}; // external linkage
}
namespace {
void Fn(int); // internal linkage
class Obj {
void MemberFn(); // internal linkage
}; // internal linkage
}
This isn't true for all declarations. For example declarations in function-scope and scopes that derive from function-scope are always no-linkage unless they are static
.
DXC currently does not support unnamed namespaces, that's why I did not include it here.
I believe this is described in the No Linkage section under the term block-scope. I can add more details to that section to make it clearer. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. I think we may need to tweak some of this in the future but I think this is pretty good.
Create chapter file for Declarations and add section about linkage. Enumerate the language defaults and where it is implementation dependent. Add empty chapter file for Statements to preserve the chapter ordering.