This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 115a. See for the official list.


960. Covariant functions and lvalue/rvalue references

Section: 11.7.3  [class.virtual]     Status: CD2     Submitter: James Widman     Date: 1 September, 2009

[Voted into WP at March, 2010 meeting.]

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.

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: