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

Method _insert_at

libCacheSim/dataStructure/sparsepp/spp.h:3159–3171  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3157 // Private method used by insert_noresize and find_or_insert.
3158 template <class T>
3159 reference _insert_at(T& obj, size_type pos, bool erased)
3160 {
3161 if (size() >= max_size())
3162 {
3163 throw_exception(std::length_error("insert overflow"));
3164 }
3165 if (erased)
3166 {
3167 assert(num_deleted);
3168 --num_deleted;
3169 }
3170 return table.set(pos, obj);
3171 }
3172
3173 // If you know *this is big enough to hold obj, use this routine
3174 template <class T>

Callers

nothing calls this directly

Calls 5

sizeFunction · 0.85
max_sizeFunction · 0.85
throw_exceptionFunction · 0.85
assertFunction · 0.85
setMethod · 0.45

Tested by

no test coverage detected