summaryrefslogtreecommitdiff
path: root/lib/collections.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/collections.h')
-rw-r--r--lib/collections.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/collections.h b/lib/collections.h
index 6f26eae..fcd65d3 100644
--- a/lib/collections.h
+++ b/lib/collections.h
@@ -107,6 +107,15 @@ operator+=(std::vector<T...> & in, std::vector<T...> && src)
return in;
}
+template<typename... T>
+constexpr auto
+operator+(std::vector<T...> in1, std::vector<T...> in2)
+{
+ in1.reserve(in1.size() + in2.size());
+ std::move(in2.begin(), in2.end(), std::back_inserter(in1));
+ return in1;
+}
+
template<typename... T, typename Vn>
[[nodiscard]] constexpr auto
operator+(const std::vector<T...> & in, Vn && vn)