Created on 2008-10-06.00:00:00 last changed 178 months ago
[Voted into WP at October, 2009 meeting.]
Proposed resolution (September, 2009):
Change 7.6.1.5 [expr.ref] paragraph 4, bullet 3, sub-bullet 2 as follows:
...
...
Otherwise, if E1.E2 refers to a non-static member function and the type of E2 is “function of parameter-type-list cv ref-qualifieropt returning T”, then E1.E2 is an rvalue. The expression designates a non-static member function...
Change 7.6.4 [expr.mptr.oper] paragraph 6 as follows:
...—end example] In a .* expression whose object expression is an rvalue, if the second operand is a pointer to member function with ref-qualifier &, the program is ill-formed. In a ->* expression, or in a .* expression whose object expression is an lvalue, if the second operand is a pointer to member function with ref-qualifier &&, the program is ill-formed. The result of a .* expression is an lvalue only if its first operand is an lvalue and...
Change 9.9 [namespace.udecl] paragraph 15 as follows:
When a using-declaration brings names from a base class into a derived class scope, member functions and member function templates in the derived class override and/or hide member functions and member function templates with the same name, parameter-type-list (9.3.4.6 [dcl.fct]),andcv-qualification, and ref-qualifier (if any) in a base class (rather than conflicting). [Note:...
There are several places in the Standard that were overlooked when reference qualification of member functions was added. For example, 7.6.1.5 [expr.ref] paragraph 4, bullet 3, sub-bullet 2 says,
...if E1.E2 refers to a non-static member function, and the type of E2 is “function of parameter-type-list cv returning T”, then...
This wording incorrectly excludes member functions declared with a ref-qualifier.
Another place that should consider reference qualification is 7.6.4 [expr.mptr.oper]; it should not be possible to invoke an &-qualified member function with an rvalue object expression.
A third place is 9.9 [namespace.udecl] paragraph 15, which does not mention reference qualification in connection with the hiding/overriding of member functions brought in from a base class via a using-declaration.
History | |||
---|---|---|---|
Date | User | Action | Args |
2010-03-29 00:00:00 | admin | set | status: dr -> cd2 |
2009-11-08 00:00:00 | admin | set | messages: + msg2433 |
2009-11-08 00:00:00 | admin | set | status: tentatively ready -> dr |
2009-09-29 00:00:00 | admin | set | messages: + msg2292 |
2009-09-29 00:00:00 | admin | set | status: drafting -> tentatively ready |
2009-08-03 00:00:00 | admin | set | status: open -> drafting |
2008-10-06 00:00:00 | admin | create |