Resolution of B-2 not reflected in B-6 (aka covariant returns)

Martin von Loewis loewis at informatik.hu-berlin.de
Thu Mar 9 18:22:09 UTC 2000


> Actually, I believe this is the only legal thing to do: for the caller, the
> return type may be a pointer to an incomplete type

No, that cannot happen; 10.3/5 says

# 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.

Martin





More information about the cxx-abi-dev mailing list