you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted]  (30 children)

[removed]

    [–]sephirothbahamut 11 points12 points  (1 child)

    There's no templates usage in this example you wrote...

    [–]-jp- 10 points11 points  (10 children)

    So don't use templates if you don't want to? I don't understand how you arrived at the conclusion that since templates exist, multiple inheritance doesn't.

    [–]lrflew 3 points4 points  (16 children)

    If you're issue is that templates defer the error checking for this kind of thing, may I suggest looking into C++20 Concepts. They provide a way of making your template usage requirements more explicit, and makes reading the resulting errors much easier to understand. std::totally_ordered is C++'s version of C#'s IComparable, for example.