I'm trying to build an entity-component class which stores components in a vector of std::arrays of std::unique_ptrs of derived Component pointers, like so:
vector<pair<int, array<unique_ptr<Component>, 32>>> components;
When trying to create a new array for a new component, though, even using move(), I wind up getting the following error:
this->count++;
vector<pair<int, array<unique_ptr<Component>, 32>>> component_set;
this->components.emplace_back(make_pair(this->count, move(component_set)));
Error 1 error C2248: 'std::unique_ptr<_Ty>::unique_ptr' :
cannot access private member declared in class 'std::unique_ptr<_Ty>'
c:\program files\microsoft visual studio 11.0\vc\include\array 211 1
entity
is this a problem with using the std::array class, or am I just doing this entirely wrong (which is possible?)
Aucun commentaire:
Enregistrer un commentaire