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
patent_button.gif valid-html401.png elektra.jpg permaplant.png fsfe-logo.png valid-css.png vim.gif anybrowser.gif