hello to everyone, if I have for example some class Base
and derived from it Derived
Also I have some list of shared pointers:
list<shared_ptr<Base> > list
I create shared pointer:
line 5 shared_ptr<Derived> ptr(new Derived(//some constructor));
my question is, can I do something like this:
list.push_back(ptr);
if Yes, can somebody explain why can I recieve an error (I receive this on the line 5)
no matching function for call to //here It writes me my constructor to Derived
thanks in advance for any help