Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/EricPengShuai/Interview
/ pop_back
Method
pop_back
base_code/template.cpp:258–265 ·
view source on GitHub ↗
Source
from the content-addressed store, hash-verified
256
}
257
258
void pop_back() // 从容器末尾删除元素
259
{
260
if (empty()) {
261
return;
262
}
263
-- _last;
264
_allocator.destroy(_last);
265
}
266
267
T back() const { return *(_last - 1); }
268
Callers
2
main
Function · 0.80
main
Function · 0.80
Calls
1
destroy
Method · 0.80
Tested by
no test coverage detected