We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f147437 commit db02531Copy full SHA for db02531
libcxx/include/__vector/vector.h
@@ -165,10 +165,12 @@ class _LIBCPP_TEMPLATE_VIS vector {
165
_LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI
166
vector(size_type __n, const value_type& __x, const allocator_type& __a)
167
: __alloc_(__a) {
168
+ auto __guard = std::__make_exception_guard(__destroy_vector(*this));
169
if (__n > 0) {
170
__vallocate(__n);
171
__construct_at_end(__n, __x);
172
}
173
+ __guard.__complete();
174
175
176
template <class _InputIterator,
0 commit comments