From 767bb3951c65e38627cb0bbad9a3756e1cda2520 Mon Sep 17 00:00:00 2001 From: Daniel Wilhelm Date: Fri, 18 Apr 2014 17:30:42 +0200 Subject: 6.1 --- zen/stl_tools.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'zen/stl_tools.h') diff --git a/zen/stl_tools.h b/zen/stl_tools.h index 2bb4fd3f..92cd86ad 100644 --- a/zen/stl_tools.h +++ b/zen/stl_tools.h @@ -25,6 +25,9 @@ namespace zen template void vector_remove_if(V& vec, Predicate p); +template +void vector_append(V& vec, W& vec2); + template void set_remove_if(S& set, Predicate p); @@ -88,6 +91,13 @@ void vector_remove_if(V& vec, Predicate p) } +template inline +void vector_append(V& vec, W& vec2) +{ +vec.insert(vec.end(), vec2.begin(), vec2.end()); +} + + template inline void set_remove_if(S& set, Predicate p) { @@ -196,6 +206,7 @@ template inline std::u template inline std::unique_ptr make_unique(Arg1&& arg1, Arg2&& arg2, Arg3&& arg3, Arg4&& arg4) { return std::unique_ptr(new T(std::forward(arg1), std::forward(arg2), std::forward(arg3), std::forward(arg4))); } template inline std::unique_ptr make_unique(Arg1&& arg1, Arg2&& arg2, Arg3&& arg3, Arg4&& arg4, Arg5&& arg5) { return std::unique_ptr(new T(std::forward(arg1), std::forward(arg2), std::forward(arg3), std::forward(arg4), std::forward(arg5))); } template inline std::unique_ptr make_unique(Arg1&& arg1, Arg2&& arg2, Arg3&& arg3, Arg4&& arg4, Arg5&& arg5, Arg6&& arg6) { return std::unique_ptr(new T(std::forward(arg1), std::forward(arg2), std::forward(arg3), std::forward(arg4), std::forward(arg5), std::forward(arg6))); } +template inline std::unique_ptr make_unique(Arg1&& arg1, Arg2&& arg2, Arg3&& arg3, Arg4&& arg4, Arg5&& arg5, Arg6&& arg6, Arg7&& arg7) { return std::unique_ptr(new T(std::forward(arg1), std::forward(arg2), std::forward(arg3), std::forward(arg4), std::forward(arg5), std::forward(arg6), std::forward(arg7))); } //template inline //std::unique_ptr make_unique(Args&& ...args) -- cgit