May 28th, 2014, 8:55 am
Quotestd::heterogenous<Shape*> means that it contains only 1 type: pointers to a Shape. It's not heterogenous, it's how you do it now with the list (the list is not heterogenous)IMO the exact opposite is true.Shape* s = new AnyDerived();Quotestd::heterogenous<Rectangle, Circle, Square > means that it contains elements that can be one of 3 typesstd::heterogenous<Rectangle*, Circle*, Square* > means that it contains pointers to elements that can be one of 3 typesDon't like this (hard-coded).What's the rationale here?
Last edited by
Cuchulainn on May 27th, 2014, 10:00 pm, edited 1 time in total.