Commit c7f5f0caf2a1d38e824b877ed40e53361f5bf097
1 parent
1df054ae
Added std::forward to args...
Showing
1 changed file
with
1 additions
and
1 deletions
examples11/06-template_metaprogramming/vector.h
| ... | ... | @@ -171,7 +171,7 @@ public: |
| 171 | 171 | |
| 172 | 172 | template <class T, class... Args> auto push_back(T &&a, Args &&...args) { |
| 173 | 173 | auto op1 = push_back(std::forward<T>(a)); |
| 174 | - auto op2 = push_back(args...); | |
| 174 | + auto op2 = push_back(std::forward<Args>(args)...); | |
| 175 | 175 | return std::tuple_cat(op1, op2); |
| 176 | 176 | } |
| 177 | 177 | }; | ... | ... |