-
Notifications
You must be signed in to change notification settings - Fork 4
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
GB-051 9.3.4.6 [dcl.fct], 9.3.4.7 [dcl.fct.default] Can an explicit object parameter have a default argument? #451
Comments
Maybe interesting as a clarification but as you can't avoid providing an implicit object parameter before the dot there is no way that the default argument would ever be used. I noted that at least in the MSVC implementation the pointer type is a function pointer (not a member function pointer), but this does not mean that a default expression would be usable. |
Accept the proposed resolution to GB-051, and forward this to CWG.
Result: Consensus |
Note the example is incorrect, however the 'default'-ness issue was understood in the room.
|
CWG 2022-11-08: Accepted with Modifications. See CWG2653 for details. |
The syntax and semantics appear to allow:
This is probably no more than an oddity, but perhaps it should be prevented.
Strike this[opt] at the 2nd and 4th occurrence in the grammar of parameter-declaration.
Add a Note: an explicit-object-parameter-declaration cannot have an initializer-clause.
The text was updated successfully, but these errors were encountered: