You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Current default ctor of MGLevelObject will call resize() and thus will involve make_shared<Ojbect> during compilation (not really call it at run time).
Hence the following class can not be constructed by default.
classA {
public:A(constint a) : a(a) {}
int a;
};
MGLevelObject<A> a_list{}; // no matching function for call to A::A()
Actually the MGLevelObject<A> owns std::vector<std::shared_ptr<A>> and can be default constructed.
The text was updated successfully, but these errors were encountered:
Current default ctor of
MGLevelObject
will callresize()
and thus will involvemake_shared<Ojbect>
during compilation (not really call it at run time).Hence the following class can not be constructed by default.
Actually the
MGLevelObject<A>
ownsstd::vector<std::shared_ptr<A>>
and can be default constructed.The text was updated successfully, but these errors were encountered: