aboutsummaryrefslogtreecommitdiff
path: root/src/util.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/util.h')
-rw-r--r--src/util.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/util.h b/src/util.h
index 2c22720a6b..23b2a787e4 100644
--- a/src/util.h
+++ b/src/util.h
@@ -355,4 +355,18 @@ std::string CopyrightHolders(const std::string& strPrefix);
*/
int ScheduleBatchPriority(void);
+namespace util {
+
+//! Simplification of std insertion
+template <typename Tdst, typename Tsrc>
+inline void insert(Tdst& dst, const Tsrc& src) {
+ dst.insert(dst.begin(), src.begin(), src.end());
+}
+template <typename TsetT, typename Tsrc>
+inline void insert(std::set<TsetT>& dst, const Tsrc& src) {
+ dst.insert(src.begin(), src.end());
+}
+
+} // namespace util
+
#endif // BITCOIN_UTIL_H