Prev: constexpr array function pointers as fast as switch
Next: compilation error when Base Constructor calling pure virtual method
From: Mathias Gaunard on 11 Jul 2010 04:38 On Jul 10, 3:14 pm, DeMarcus <use_my_alias_h...(a)hotmail.com> wrote: > Thanks! But could you please explain that. First I don't understand what > some_empty_class_type is Some empty class type. > and what it brings. Well, you don't have to put a default in there, but inheriting from a dummy empty class type seems like a good default behaviour for when you don't care about what it inherits from. > I also don't understand > what you mean with avoiding multiple inheritance and why that is necessary. What if you want to use that mixin in a class, but still want to inherit from something else? You'd need multiple inheritance. Multiple inheritance when you don't need it is silly. It would add unnecessary runtime and memory overhead, among other problems. -- [ See http://www.gotw.ca/resources/clcm.htm for info about ] [ comp.lang.c++.moderated. First time posters: Do this! ] |