]> gcc.gnu.org Git - gcc.git/commit
libstdc++: Implement N3644 on _Safe_iterator<> [PR114316]
authorFrançois Dumont <fdumont@gcc.gnu.org>
Thu, 14 Mar 2024 21:13:57 +0000 (22:13 +0100)
committerFrançois Dumont <fdumont@gcc.gnu.org>
Sun, 17 Mar 2024 15:46:12 +0000 (16:46 +0100)
commitc1f57ff40738bbce9902ea25865ed6d729b10127
tree53de172fad7c3c2f932835b08dd50233bf473809
parent427349d8db30028ea5c9a8ba83b390f465fa041f
libstdc++: Implement N3644 on _Safe_iterator<> [PR114316]

Consider range of value-initialized iterators as valid and empty.

libstdc++-v3/ChangeLog:

PR libstdc++/114316
* include/debug/safe_iterator.tcc (_Safe_iterator<>::_M_valid_range):
First check if both iterators are value-initialized before checking if
singular.
* testsuite/23_containers/set/debug/114316.cc: New test case.
* testsuite/23_containers/vector/debug/114316.cc: New test case.

(cherry picked from commit 07fad7a7fc245369989e9ca746728ea78b924715)
libstdc++-v3/include/debug/safe_iterator.tcc
libstdc++-v3/testsuite/23_containers/set/debug/114316.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/vector/debug/114316.cc [new file with mode: 0644]
This page took 0.057813 seconds and 6 git commands to generate.