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 831ba95 commit 7ff58b5Copy full SHA for 7ff58b5
libcxx/include/vector
@@ -433,10 +433,12 @@ public:
433
_LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI
434
vector(size_type __n, const value_type& __x, const allocator_type& __a)
435
: __end_cap_(nullptr, __a) {
436
+ auto __guard = std::__make_exception_guard(__destroy_vector(*this));
437
if (__n > 0) {
438
__vallocate(__n);
439
__construct_at_end(__n, __x);
440
}
441
+ __guard.__complete();
442
443
444
template <class _InputIterator,
0 commit comments