]> git.ipfire.org Git - thirdparty/gcc.git/commit
libstdc++: Add debug assertions to std::list and std::forward_list
authorJonathan Wakely <jwakely@redhat.com>
Fri, 15 Nov 2024 22:03:20 +0000 (22:03 +0000)
committerJonathan Wakely <redi@gcc.gnu.org>
Wed, 27 Nov 2024 12:30:01 +0000 (12:30 +0000)
commite7aa614d7372b5d3cbcd2400838c80ef905ba381
treeba07e153e2bd9467c0a83475bbb24516b497ec17
parent751f91be72d8b73a9dc71456f475268397330100
libstdc++: Add debug assertions to std::list and std::forward_list

While working on fancy pointer support for the linked lists I noticed
they didn't have any debug assertions. This adds the obvious non-empty
assertions to front() and back().

libstdc++-v3/ChangeLog:

* include/bits/forward_list.h (forward_list::front): Add
non-empty assertions.
* include/bits/stl_list.h (list::front, list::back): Add
non-empty assertions.
libstdc++-v3/include/bits/forward_list.h
libstdc++-v3/include/bits/stl_list.h