MCPcopy Create free account
hub / github.com/1a1a11a/libCacheSim / _insert

Method _insert

libCacheSim/dataStructure/sparsepp/spp.h:3191–3201  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3189 // (1) Iterator supports operator-, resize before inserting
3190 template <class ForwardIterator>
3191 void _insert(ForwardIterator f, ForwardIterator l, std::forward_iterator_tag /*unused*/)
3192 {
3193 int64_t dist = std::distance(f, l);
3194 if (dist < 0 || static_cast<size_t>(dist) >= (std::numeric_limits<size_type>::max)())
3195 throw_exception(std::length_error("insert-range overflow"));
3196
3197 _resize_delta(static_cast<size_type>(dist));
3198
3199 for (; dist > 0; --dist, ++f)
3200 _insert_noresize(*f);
3201 }
3202
3203 // (2) Arbitrary iterator, can't tell how much to resize
3204 template <class InputIterator>

Callers

nothing calls this directly

Calls 1

throw_exceptionFunction · 0.85

Tested by

no test coverage detected