diff options
author | Jonathan Wakely <jwakely@redhat.com> | 2025-05-01 22:56:56 +0100 |
---|---|---|
committer | Jonathan Wakely <redi@gcc.gnu.org> | 2025-05-06 13:00:44 +0100 |
commit | ac9fec014df8d75c2185981c9d191d1080e98094 (patch) | |
tree | 743fad196207464def73e1232cba6698d3e7420a /libstdc++-v3/include/std | |
parent | 76c33109074b8e7cf6c326116b46792070122c7b (diff) | |
download | gcc-ac9fec014df8d75c2185981c9d191d1080e98094.zip gcc-ac9fec014df8d75c2185981c9d191d1080e98094.tar.gz gcc-ac9fec014df8d75c2185981c9d191d1080e98094.tar.bz2 |
libstdc++: Add noexcept to some std::counted_iterator operations
This was inspired by LWG 4245 but goes further. Anything which only
reads or writes the _M_length member can be noexcept. That
member is an iterator difference_type which means it's a signed integer
type or the __max_diff_type integer-like class type, so all arithmetic
and comparisons are non-throwing.
libstdc++-v3/ChangeLog:
* include/bits/stl_iterator.h (counted_iterator): Add noexcept
to friend operators which only access the _M_length member.
Reviewed-by: Tomasz KamiĆski <tkaminsk@redhat.com>
Diffstat (limited to 'libstdc++-v3/include/std')
0 files changed, 0 insertions, 0 deletions