Skip to content

Commit

Permalink
Verify in vector::pop_back if _CONTAINER_DEBUG_LEVEL > 0 (#4849)
Browse files Browse the repository at this point in the history
  • Loading branch information
vasama authored Aug 8, 2024
1 parent 4122957 commit 877717a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions stl/inc/vector
Original file line number Diff line number Diff line change
Expand Up @@ -1707,9 +1707,9 @@ public:
auto& _My_data = _Mypair._Myval2;
pointer& _Mylast = _My_data._Mylast;

#if _ITERATOR_DEBUG_LEVEL == 2
#if _CONTAINER_DEBUG_LEVEL > 0
_STL_VERIFY(_My_data._Myfirst != _Mylast, "vector empty before pop");
#endif // _ITERATOR_DEBUG_LEVEL == 2
#endif // _CONTAINER_DEBUG_LEVEL > 0

_Orphan_range(_Mylast - 1, _Mylast);
_Alty_traits::destroy(_Getal(), _Unfancy(_Mylast - 1));
Expand Down

0 comments on commit 877717a

Please sign in to comment.