-
Notifications
You must be signed in to change notification settings - Fork 7
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
CWG2902 Use of id-expressions denoting explicit object member functions is too permissive #573
Comments
This seems to be a dupe/related to the already posted issue: [basic.compound] Current wording seems to disallow formation of pointer to static member function and explicit object member function without & operator. |
Yeah that was our intent with the design/wording. Both |
Folded into CWG2902. |
Full name of submitter (unless configured in github; will be published with the issue): Barry Revzin
Reference (section label): Unknown
Link to reflector thread (if any): None
Issue description: There is implementation divergence in the following example:
For
#1
, MSVC currently accepts, gcc reject and clang reject. Our current wording, I think, allows this by way of the P2797's change to [expr.prim.id.general]'s limits of when to use an id-expression that denotes a non-static member or non-static member function to only apply to implicit object member functions. However, that change doesn't seem related to the rest of the paper and the design intent of P0847 was to reject such usage.For
#2
, all compilers current reject, but I think the [expr.prim.id.general] relaxation might actually allow it. I'm not sure if there is any other rule that forbids it, but we do want to disallow this case.The text was updated successfully, but these errors were encountered: