-
Notifications
You must be signed in to change notification settings - Fork 1
CWG2588 friend declarations and module linkage #1253
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
Comments
EWG Discussed this during the June 9th, 2022 EWG telecon, and the following polls were taken: A friend's linkage should be affected by the linkage of the befriending class (#1).
Result: Not Consensus A friend's linkage should be affected by the presence/absence of export on the containing class definition itself (#2).
Result: Not Consensus A friend's linkage should be affected by the presence/absence of export on the containing class definition itself, but ONLY if the friend is a definition (#2, modified by Jason's suggestion).
Result: Consensus A friend's linkage should be determined per 11.8.4p4 alone (#3).
Result: Not Consensus A friend's linkage should be as-if the declaration inhabited the nearest enclosing namespace scope (#4).
Result: Not Consensus Confirmation of the 3rd poll is required to go through EWG Electronic polling. |
This was voted on in the June 2022 EWG polls. Results are here. 🗳 Poll: A friend’s linkage should be affected by the presence/absence of export on the containing class definition itself, but ONLY if the friend is a definition (option #2, modified by Jason’s suggestion). This resolves CWG2588. Note: Jason’s suggestion: A friend declaration shouldn’t affect linkage if it is not a definition. Exporting definition of class exports "friendliness" but not export of friend function itself.
|
Moved in St. Louis. |
The linkage of friend functions and classes is unclear, if the first (and possibly only) declaration is in a class.
https://cplusplus.github.io/CWG/issues/2588.html
The text was updated successfully, but these errors were encountered: