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

Popular posts from this blog

haskell - Using filter on an item in a list? -

c# - When does PreApplicationStartMethod actually get triggered to run? -

tomcat6 - Exception when stopping container for a with Spring + Quartz + Tomcat web application -