1
のコレクションをstd::tuple
に保存しています。しかし、タプルから要素を取得して変更すると、返された要素のコピーのみを変更しています。そう、それ自体でオートを使用してstd :: tupleからの参照ではなくコピーの取得
ecs::component::ComponentStore<ecs::component::Position, ecs::component::Velocity> comstore;
//Get the position vector
auto positionvec = comstore.Get<ecs::component::Position>();
//Add a new position
positionvec.emplace_back(ecs::component::Position{});
//Later on, get the position vector again
auto positionvec2 = comstore.Get<ecs::component::Position>();
//But it's empty??? this is wrong. It should have 1 element.