20 Jul
2013
20 Jul
'13
4:02 p.m.
on Thu Jul 18 2013, Andrew Ho
I've noticed about the empty_base class is that it's templated with type T, and I don't think it should be.
Fyi, the empty_base class is there to turn multiple inheritance into a single inheritance chain (due to compiler deficiencies/object size bloat on at least Visual Studio).
I don't see why this empty_base should be templated, and it would be better suited if it wasn't since all I can think it does is make the compiler work harder. Does anyone know why it was templated to begin with? Additionally, are we safe to change empty_base to be not use templates?
It's templated so that multiple inheritance doesn't kill the empty base optimization. -- Dave Abrahams