summaryrefslogtreecommitdiff
path: root/zen/stl_tools.h
diff options
context:
space:
mode:
Diffstat (limited to 'zen/stl_tools.h')
-rw-r--r--zen/stl_tools.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/zen/stl_tools.h b/zen/stl_tools.h
index a8f2a9b5..d00fc732 100644
--- a/zen/stl_tools.h
+++ b/zen/stl_tools.h
@@ -19,7 +19,10 @@ template <class V, class Predicate>
void vector_remove_if(V& vec, Predicate p);
template <class V, class W>
-void vector_append(V& vec, W& vec2);
+void vector_append(V& vec, const W& vec2);
+
+template <class V, class W>
+void set_append(V& s, const W& s2);
template <class S, class Predicate>
void set_remove_if(S& set, Predicate p);
@@ -68,12 +71,19 @@ void vector_remove_if(V& vec, Predicate p)
template <class V, class W> inline
-void vector_append(V& vec, W& vec2)
+void vector_append(V& vec, const W& vec2)
{
vec.insert(vec.end(), vec2.begin(), vec2.end());
}
+template <class V, class W> inline
+void set_append(V& s, const W& s2)
+{
+ s.insert(s2.begin(), s2.end());
+}
+
+
template <class S, class Predicate> inline
void set_remove_if(S& set, Predicate p)
{
bgstack15