File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -465,11 +465,9 @@ class _LIBCPP_TEMPLATE_VIS vector {
465465 _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void __emplace_back_assume_capacity (_Args&&... __args) {
466466 _LIBCPP_ASSERT_INTERNAL (
467467 size () < capacity (), " We assume that we have enough space to insert an element at the end of the vector" );
468- __alloc_traits::construct (this ->__alloc_ , std::__to_address (this ->__end_ ), std::forward<_Args>(__args)...);
469- ++this ->__end_ ;
470- #if _LIBCPP_HAS_ASAN
471- __annotate_increase (1 );
472- #endif
468+ _ConstructTransaction __tx (*this , 1 );
469+ __alloc_traits::construct (this ->__alloc_ , std::__to_address (__tx.__pos_ ), std::forward<_Args>(__args)...);
470+ ++__tx.__pos_ ;
473471 }
474472
475473#if _LIBCPP_STD_VER >= 23
You can’t perform that action at this time.
0 commit comments