You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
structC {
intf(this C);
};
using T = decltype(C::f); // #1int g = C::f(42); // #2
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.