Created on 2011-03-03.00:00:00 last changed 131 months ago
[Voted into the WP at the February, 2012 meeting; moved to DR at the October, 2012 meeting.]
Proposed resolution (August, 2011):
Change 11.7.3 [class.virtual] paragraph 8 as follows:
If the class type in the covariant return type of D::f differs fromthe return typethat of B::f, the class type in the return type of D::f shall be complete at the point of declaration of D::f or shall be the class type D. When the overriding function...
According to 11.7.3 [class.virtual] paragraph 8,
If the return type of D::f differs from the return type of B::f, the class type in the return type of D::f shall be complete at the point of declaration of D::f or shall be the class type D.
This provision was intended to deal with covariant return types but inadvertently affects types that vary only in cv-qualification:
struct A; struct B { virtual const A* f(); }; struct D : B { A* f(); // ill-formed };
History | |||
---|---|---|---|
Date | User | Action | Args |
2014-03-03 00:00:00 | admin | set | status: drwp -> cd3 |
2012-11-03 00:00:00 | admin | set | status: dr -> drwp |
2012-02-27 00:00:00 | admin | set | messages: + msg3824 |
2012-02-27 00:00:00 | admin | set | status: ready -> dr |
2011-09-06 00:00:00 | admin | set | messages: + msg3482 |
2011-03-03 00:00:00 | admin | create |