MCPcopy Create free account
hub / github.com/emscripten-core/emscripten / __destroy_vector

Class __destroy_vector

system/lib/libcxx/include/__vector/vector.h:245–259  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

243
244private:
245 class __destroy_vector {
246 public:
247 _LIBCPP_CONSTEXPR _LIBCPP_HIDE_FROM_ABI __destroy_vector(vector& __vec) : __vec_(__vec) {}
248
249 _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void operator()() {
250 if (__vec_.__begin_ != nullptr) {
251 __vec_.clear();
252 __vec_.__annotate_delete();
253 __alloc_traits::deallocate(__vec_.__alloc_, __vec_.__begin_, __vec_.capacity());
254 }
255 }
256
257 private:
258 vector& __vec_;
259 };
260
261public:
262 _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI ~vector() { __destroy_vector (*this)(); }

Callers 6

vectorFunction · 0.70
__alloc_Function · 0.70
vector.hFile · 0.70
__init_with_sizeFunction · 0.70
__init_with_sentinelFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected