Created on 2021-08-14.00:00:00 last changed 1 month ago
This wording is relative to N4892.
Modify [range.iota.iterator] as indicated:
friend constexpr iterator operator+(iterator i, difference_type n) requires advanceable<W>;
-20- Effects: Equivalent to:
returni += n;friend constexpr iterator operator+(difference_type n, iterator i) requires advanceable<W>;
-21- Effects: Equivalent to: return i + n;friend constexpr iterator operator-(iterator i, difference_type n) requires advanceable<W>;
-22- Effects: Equivalent to:
returni -= n;
[ 2021-08-20; Reflector poll ]
Set status to Tentatively Ready after six votes in favour during reflector poll.
iota_view's iterator's operator+ could avoid a copy construct by doing "i += n; return i" rather than "return i += n;" as seen in [range.iota.iterator].This is what libc++ has implemented and shipped, even though it may not technically be conforming (if a program asserted the number of copies, for example). It might be good to update this operator and the minus operator accordingly.
|2021-08-20 17:16:53||admin||set||messages: + msg12004|
|2021-08-20 17:16:53||admin||set||status: new -> ready|
|2021-08-14 20:06:41||admin||set||messages: + msg11987|