]> git.ipfire.org Git - thirdparty/gcc.git/commit
libstdc++: Add assertions to std::list::pop_{front,back}
authorJonathan Wakely <jwakely@redhat.com>
Thu, 27 Feb 2025 21:59:41 +0000 (21:59 +0000)
committerJonathan Wakely <redi@gcc.gnu.org>
Thu, 6 Mar 2025 16:17:34 +0000 (16:17 +0000)
commit4412e9bb73754a0c9668e80c4b8ee2fefffbbb04
tree61a06b6210efa23b86c523dc23e16044c97cd4d7
parent88a521cc3283ae6b6bccc7afefe4723399ddb975
libstdc++: Add assertions to std::list::pop_{front,back}

The recently-approved Standard Library Hardening proposal (P3471R4)
gives pop_front and pop_back member functions hardened preconditions,
but std::list was missing assertions on them. Our other sequence
containers do have assertions on those members.

libstdc++-v3/ChangeLog:

* include/bits/stl_list.h (list::pop_front, list::pop_back):
Add non-empty assertions.

Reviewed-by: Patrick Palka <ppalka@redhat.com>
libstdc++-v3/include/bits/stl_list.h