MCPcopy Create free account
hub / github.com/apache/trafficserver / push_back

Method push_back

lib/swoc/include/swoc/Vectray.h:294–307  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

292
293template <typename T, size_t N, typename A>
294auto
295Vectray<T, N, A>::push_back(const T &t) -> self_type & {
296 std::visit(swoc::meta::vary{[&](FixedStore &fs) -> void {
297 if (fs._count < N) {
298 new (reinterpret_cast<T *>(fs._raw.data()) + fs._count++) T(t); // A::traits ?
299 } else {
300 this->transfer();
301 std::get<DYNAMIC>(_store).push_back(t);
302 }
303 },
304 [&](DynamicStore &ds) -> void { ds.push_back(t); }},
305 _store);
306 return *this;
307}
308
309template <typename T, size_t N, typename A>
310auto

Callers 6

register_sinkMethod · 0.45
swoc_file.ccFile · 0.45
test_Vectray.ccFile · 0.45
test_TextView.ccFile · 0.45
parseMethod · 0.45

Calls 3

transferMethod · 0.95
visitFunction · 0.85
dataMethod · 0.45

Tested by

no test coverage detected