When overriding virtual function returns D*, and the overridden function returned B*, where D derives from B; then B* and D* are covariant return types.
Reference: C++ Common Knowledge by Stephen C. Dewhurst. Addison-Wesley, 2005., p. 107.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment