I am attempting to use a boost::ptr_vector
in a current project, and was wondering if it was possible to use a parameterized constructor in the push_back() method, or if I am required to use a default constructor?
As a secondary question will it still use a default constructor if I define it?
This might not be the best follow-up, but most of the implementations that I have seen with the boost::ptr_vector
show that the push_back()
method takes the new
operator. Is it possible to create an object, and then give the pointer to that object to the push_back()
method of the container?