Tuesday, January 12, 2010

C++98: Covariant Return Types

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.

No comments:

Post a Comment