C++ stl vector for classes with private copy constructor? -
there class in our code, class c
. want create vector of objects of class c
. however, both copy constructor , assignment operator purposely declared private
. don't want (and perhaps not allowed) change that.
is there other clean way use/define vector<c>
?
you use vector<c*>
or vector<shared_ptr<c>>
instead.
Comments
Post a Comment