| 245 | |
| 246 | template<typename... Types> |
| 247 | void emplace_back(Types&&... args) |
| 248 | { |
| 249 | if (full()) { |
| 250 | expand(); |
| 251 | } |
| 252 | // 1. 引用折叠 &+&& => &, &&+&& => && |
| 253 | // 2. 类型完美转发 forward |
| 254 | _allocator.construct(_last, std::forward<Types>(args)...); |
| 255 | ++ _last; |
| 256 | } |
| 257 | |
| 258 | void pop_back() // 从容器末尾删除元素 |
| 259 | { |