Title
Covariant functions and lvalue/rvalue references
Status
cd2
Section
11.7.3 [class.virtual]
Submitter
James Widman

Created on 2009-09-01.00:00:00 last changed 171 months ago

Messages

Date: 2010-03-15.00:00:00

[Voted into WP at March, 2010 meeting.]

Date: 2010-02-15.00:00:00

Proposed resolution (February, 2010):

Change 11.7.3 [class.virtual] bullet 5.1 as follows:

...If a function D::f overrides a function B::f, the return types of the functions are covariant if they satisfy the following criteria:

  • both are pointers to classes, both are lvalue references to classes, or both are rvalue references to classes106

  • ...

Date: 2009-09-01.00:00:00

11.7.3 [class.virtual] paragraph 5 requires that covariant return types be either both pointers or both references, but it does not specify that references must be both lvalue references or both rvalue references. Presumably this is an oversight.

History
Date User Action Args
2010-03-29 00:00:00adminsetmessages: + msg2716
2010-03-29 00:00:00adminsetstatus: tentatively ready -> cd2
2010-02-16 00:00:00adminsetmessages: + msg2503
2010-02-16 00:00:00adminsetstatus: drafting -> tentatively ready
2009-11-08 00:00:00adminsetstatus: open -> drafting
2009-09-01 00:00:00admincreate