insert__ilist.cpp
Go to the documentation of this file.
00001 #include <json.hpp>
00002 
00003 using json = nlohmann::json;
00004 
00005 int main()
00006 {
00007     // create a JSON array
00008     json v = {1, 2, 3, 4};
00009 
00010     // insert range from v2 before the end of array v
00011     auto new_pos = v.insert(v.end(), {7, 8, 9});
00012 
00013     // output new array and result of insert call
00014     std::cout << *new_pos << '\n';
00015     std::cout << v << '\n';
00016 }


rc_visard_driver
Author(s): Heiko Hirschmueller , Christian Emmerich , Felix Ruess
autogenerated on Thu Jun 6 2019 20:43:05