These two files show the covariant problem.
See problem.cpp to know what it is and
see kovariant.cpp for a dynamic solution.

There are better solutions with higher-order
subtyping (templates).


return.cpp shows how you can return covariant
parameters. But this does not work with templates,
see templated.cpp. Why it does not work is shown
in the reduced example level.cpp (without
templates).
Archiviert am 14.02.2026
valid-html401.png patent_button.gif anybrowser.gif permaplant.png vim.gif elektra.jpg fsfe-logo.png valid-css.png