aboutsummaryrefslogtreecommitdiff
path: root/src/univalue/include/univalue.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/univalue/include/univalue.h')
-rw-r--r--src/univalue/include/univalue.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/univalue/include/univalue.h b/src/univalue/include/univalue.h
index 22be0311e8..7f9a6aaffd 100644
--- a/src/univalue/include/univalue.h
+++ b/src/univalue/include/univalue.h
@@ -84,6 +84,8 @@ public:
bool push_back(const UniValue& val);
bool push_backV(const std::vector<UniValue>& vec);
+ template <class It>
+ bool push_backV(It first, It last);
void __pushKV(const std::string& key, const UniValue& val);
bool pushKV(const std::string& key, const UniValue& val);
@@ -137,6 +139,14 @@ public:
friend const UniValue& find_value( const UniValue& obj, const std::string& name);
};
+template <class It>
+bool UniValue::push_backV(It first, It last)
+{
+ if (typ != VARR) return false;
+ values.insert(values.end(), first, last);
+ return true;
+}
+
enum jtokentype {
JTOK_ERR = -1,
JTOK_NONE = 0, // eof