ソースを参照

minor changes

Michele Caini 8 年 前
コミット
aeaf1632c8
1 ファイル変更2 行追加2 行削除
  1. 2 2
      src/sparse_set.hpp

+ 2 - 2
src/sparse_set.hpp

@@ -177,9 +177,9 @@ public:
     }
     }
 
 
     template<typename... Args>
     template<typename... Args>
-    type & construct(index_type idx, Args... args) {
+    type & construct(index_type idx, Args&&... args) {
         SparseSet<Index>::construct(idx);
         SparseSet<Index>::construct(idx);
-        instances.push_back({ args... });
+        instances.push_back({ std::forward<Args>(args)... });
         return instances.back();
         return instances.back();
     }
     }