MCPcopy Create free account
hub / github.com/PeterFWS/Structure-PLP-SLAM / insert_iterator

Function insert_iterator

3rd/json/include/nlohmann/json.hpp:17793–17807  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

17791 /// see https://github.com/nlohmann/json/pull/1257
17792 template<typename... Args>
17793 iterator insert_iterator(const_iterator pos, Args&& ... args)
17794 {
17795 iterator result(this);
17796 assert(m_value.array != nullptr);
17797
17798 auto insert_pos = std::distance(m_value.array->begin(), pos.m_it.array_iterator);
17799 m_value.array->insert(pos.m_it.array_iterator, std::forward<Args>(args)...);
17800 result.m_it.array_iterator = m_value.array->begin() + insert_pos;
17801
17802 // This could have been written as:
17803 // result.m_it.array_iterator = m_value.array->insert(pos.m_it.array_iterator, cnt, val);
17804 // but the return value of insert is missing in GCC 4.8, so it is written this way instead.
17805
17806 return result;
17807 }
17808
17809 /*!
17810 @brief inserts element

Callers 1

insertFunction · 0.85

Calls 2

beginMethod · 0.45
insertMethod · 0.45

Tested by

no test coverage detected