MCPcopy Create free account
hub / github.com/EricPengShuai/Interview / push_back

Method push_back

base_code/template.cpp:235–244  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

233 // 通过万能引用实现 push_back 的两个版本
234 template<typename Types>
235 void push_back(Types&& args)
236 {
237 if (full()) {
238 expand();
239 }
240 // 1. 引用折叠 &+&& => &, &&+&& => &&
241 // 2. 类型完美转发 forward
242 _allocator.construct(_last, std::forward<Types>(args));
243 ++ _last;
244 }
245
246 template<typename... Types>
247 void emplace_back(Types&&... args)

Callers 11

mainFunction · 0.45
mainFunction · 0.45
mainFunction · 0.45
mainFunction · 0.45
mainFunction · 0.45
mainFunction · 0.45
splitFunction · 0.45
solveFunction · 0.45
mainFunction · 0.45
startPoolMethod · 0.45
stringToIntegerVectorFunction · 0.45

Calls 1

constructMethod · 0.80

Tested by

no test coverage detected