Re: [PATCH] libstdc++: Add noexcept to some std::counted_iterator operations

2025-05-05 Thread Tomasz Kaminski
On Fri, May 2, 2025 at 1:06 PM Jonathan Wakely wrote: > 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-

[PATCH] libstdc++: Add noexcept to some std::counted_iterator operations

2025-05-02 Thread Jonathan Wakely
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-throw