MCPcopy Create free account
hub / github.com/catboost/catboost / PushBack

Method PushBack

util/draft/holder_vector.h:35–44  ·  view source on GitHub ↗

TVector takes ownership of T

Source from the content-addressed store, hash-verified

33
34 // TVector takes ownership of T
35 void PushBack(T* t) {
36 try {
37 TBase::push_back(t);
38 } catch (...) {
39 if (t) {
40 D::Destroy(t);
41 }
42 throw;
43 }
44 }
45
46 void PushBack(std::unique_ptr<T> t) {
47 PushBack(t.release());

Callers 1

Y_UNIT_TESTFunction · 0.45

Calls 4

push_backFunction · 0.50
DestroyFunction · 0.50
releaseMethod · 0.45
ReleaseMethod · 0.45

Tested by

no test coverage detected