[committed] libstdc++: Fix invalid noexcept-specifier (PR 94117)

Jonathan Wakely jwakely@redhat.com
Tue Mar 10 22:16:33 GMT 2020


On 10/03/20 17:52 +0000, Jonathan Wakely wrote:
>On 10/03/20 11:40 +0000, Jonathan Wakely wrote:
>>G++ fails to diagnose this non-dependent expression, but Clang doesn't
>>like it.
>>
>>	PR c++/94117
>>	* include/std/ranges (ranges::transform_view::_Iterator::iter_move):
>>	Change expression in noexcept-specifier to match function body.
>>
>
>
>This patch goes further and removes the __iter_move helper completely,
>and the __iter_swap one, in transform_view.
>
>It also does the same in split_view, and fixes a bug where the
>noexcept-specifier was always false.
>
>I've also added new _M_i_current() accessors (overloaded for const and
>non-const) to return _M_i.__current(). Using this instead of
>_M_i._M_current fixes a bug in inner-iterator::operator*() (which is
>also present in the working draft).

I missed a few more bugs in the outer iterator, where _M_current was
being used directly despite only being valid for forward ranges. Fixed
by this patch.

Tested powerpc64le-linux, committed to master.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.txt
Type: text/x-patch
Size: 1956 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20200310/2560c320/attachment.bin>


More information about the Gcc-patches mailing list