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
[basic.start.main] Clarify what it means to "use" main
#6563
Comments
Alternatively this could adopt the wording for deleted functions in [dcl.fct.def.delete] p2:
|
@jensmaurer your paper replaced "use ([basic.def.odr])" with "use". Why is odr-use not the right interpretation here, and what is? C++98 used to define use. Did you make a typo and you meant to replace "use" with "odr-use" instead of just removing the reference to [basic.def.odr]? |
Frustratingly, I can't find anything in the meeting minutes about why this change was made between N3154 and N3214. See https://stackoverflow.com/a/25298934/481267 I don't think it's editorial. I think CWG should try to come to an agreement about what it's supposed to mean. |
@t3nsor I was initially confused too, but look at the C++98 wording I've edited into the post. In C++98, the paragraph for It looks like a purely editorial issue where someone forgot to replace "use" with "odr-use" when the term was renamed. I don't see any strong reason why the renaming of "use" to "odr-use" should suddenly change the restrictions on |
No, look at the difference between N3154 and N3214. It appears to be intentional. |
You're probably right, but then what does "use" even mean? It used to have a definition but now it's pretty meaningless. There should at least be a note which clarifies what constitutes "use" of |
That's the problem: I don't think anyone knows for sure what it means, so this should go to CWG. Especially since the language has evolved so much that there may be new questions to consider that may not have existed in C++11. |
I'm pretty sure CWG left "use" in there because it wasn't clearly "odr-use" that was intended here, but the paper to introduce "odr-use" was important enough not to get hung up over it. We need answers for Going the "deleted function" route sounds promising. |
The current wording in [basic.start.main] p3 is:
There is no forward reference for what "use" refers to and the word doesn't seem to be defined anywhere, so I'm pretty sure this is meant to mean odr-use:
- [basic.def.odr] p8
C++98 Wording
- [basic.start.main] p3
- [basic.def.odr] p2
The text was updated successfully, but these errors were encountered: