diff options
Diffstat (limited to 'libdevcore/CommonData.h')
-rw-r--r-- | libdevcore/CommonData.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/libdevcore/CommonData.h b/libdevcore/CommonData.h index 98ad548d..ab4bfe68 100644 --- a/libdevcore/CommonData.h +++ b/libdevcore/CommonData.h @@ -23,13 +23,14 @@ #pragma once +#include <libdevcore/Common.h> + #include <vector> #include <algorithm> #include <unordered_set> #include <type_traits> #include <cstring> #include <string> -#include "Common.h" namespace dev { @@ -165,6 +166,12 @@ template <class T, class U> std::vector<T>& operator+=(std::vector<T>& _a, U con _a.push_back(i); return _a; } +/// Concatenate the contents of a container onto a set +template <class T, class U> std::set<T>& operator+=(std::set<T>& _a, U const& _b) +{ + _a.insert(_b.begin(), _b.end()); + return _a; +} /// Concatenate two vectors of elements. template <class T> inline std::vector<T> operator+(std::vector<T> const& _a, std::vector<T> const& _b) |