diff --git a/src/sparse_set.hpp b/src/sparse_set.hpp index a128d91bc..85b5691c4 100644 --- a/src/sparse_set.hpp +++ b/src/sparse_set.hpp @@ -177,9 +177,9 @@ public: } template - type & construct(index_type idx, Args... args) { + type & construct(index_type idx, Args&&... args) { SparseSet::construct(idx); - instances.push_back({ args... }); + instances.push_back({ std::forward(args)... }); return instances.back(); }