Created on 2009-08-18.00:00:00 last changed 179 months ago
[Voted into WP at March, 2010 meeting.]
Proposed resolution (November, 2009):
Change 12.2.4.2.5 [over.ics.ref] paragraph 3 as follows:
AExcept for an implicit object parameter, for which see 12.2.2 [over.match.funcs], a standard conversion sequence cannot be formed if it requires binding an lvalue reference to non-const to an rvalue(except when binding an implicit object parameter; see the special rules for that case in 12.2.2 [over.match.funcs])or binding an rvalue reference to an lvalue. [Note: this means, for example, that a candidate function cannot be a viable function if it has a non-const lvalue reference parameter (other than the implicit object parameter) and the corresponding argument is a temporary or would require one to be created to initialize the lvalue reference (see 9.4.4 [dcl.init.ref]). —end note]
According to 12.2.4.2.5 [over.ics.ref] paragraphs 3-4,
A standard conversion sequence cannot be formed if it requires binding an lvalue reference to non-const to an rvalue (except when binding an implicit object parameter; see the special rules for that case in 12.2.2 [over.match.funcs]). [Note: this means, for example, that a candidate function cannot be a viable function if it has a non-const lvalue reference parameter (other than the implicit object parameter) and the corresponding argument is a temporary or would require one to be created to initialize the lvalue reference (see 9.4.4 [dcl.init.ref]). —end note]
Other restrictions on binding a reference to a particular argument that are not based on the types of the reference and the argument do not affect the formation of a standard conversion sequence, however.
Because this section does not mention attempting to bind an rvalue reference to an lvalue, such a “conversion sequence” might be selected as best and result in an ill-formed program. It should, instead, be treated like trying to bind an lvalue reference to non-const to an rvalue, making the function non-viable.
History | |||
---|---|---|---|
Date | User | Action | Args |
2010-03-29 00:00:00 | admin | set | messages: + msg2726 |
2010-03-29 00:00:00 | admin | set | status: tentatively ready -> cd2 |
2010-02-16 00:00:00 | admin | set | messages: + msg2507 |
2010-02-16 00:00:00 | admin | set | status: drafting -> tentatively ready |
2009-11-08 00:00:00 | admin | set | status: open -> drafting |
2009-08-18 00:00:00 | admin | create |