14 Mar
2016
14 Mar
'16
2:44 a.m.
On 03/13/2016 10:23 PM, Gavin Lambert wrote:
What about slicing, though? Or have you removed the base-class association between the two?
If I understand your question correctly then it works fine: struct B { int i; B() : i(9) {} }; struct C : B { }; void bar(node_ptr<B> p) { cout << p->i << endl; } int main() { cout << "Slicing:" << endl; { root_ptr<C> p = new node<C>(); bar(p); } cout << endl; } I need to take a break now ;)