aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorFrançois Dumont <fdumont@gcc.gnu.org>2021-01-28 19:00:56 +0100
committerFrançois Dumont <fdumont@gcc.gnu.org>2021-02-01 19:19:53 +0100
commit33a1e511b57465d898429740377466894a0b247d (patch)
treee95166c245283bfb7dd3120a3673ae0ee5e4ff9d /gcc
parent11056ab7687f7156846e93557c9171b77713bd7e (diff)
downloadgcc-33a1e511b57465d898429740377466894a0b247d.zip
gcc-33a1e511b57465d898429740377466894a0b247d.tar.gz
gcc-33a1e511b57465d898429740377466894a0b247d.tar.bz2
libstdc++: Make deque iterator operator- usable with value-init iterators
N3644 implies that operator- can be used on value-init iterators. We now return 0 if both iterators are value initialized. If only one is value initialized we keep the UB by returning the result of a normal computation which is a meaningless value. libstdc++-v3/ChangeLog: PR libstdc++/70303 * include/bits/stl_deque.h (std::deque<>::operator-(iterator, iterator)): Return 0 if both iterators are value-initialized. * testsuite/23_containers/deque/70303.cc: New test. * testsuite/23_containers/vector/70303.cc: New test.
Diffstat (limited to 'gcc')
0 files changed, 0 insertions, 0 deletions