I am using a boost::ptr_vector over just std::vector as it will handle the deletion of all of the pointers for me. However when I do:
ptr_vector<SoftLabelRandomTreeFunctor> functors;
functors.resize(number_of_functors);
It complains that SoftLabelRandomTreeFunctor
does not have a default constructor. However, I was under the impression that it would just need to resize big enough to fit number_of_functors
* the size of a pointer to a SoftLabelRandomTreeFunctor
, not number_of_functors
* the size of a SoftLabelRandomTreeFunctor
itself?