Created on 2024-07-03.00:00:00 last changed 3 months ago
Proposed resolution:
This wording is relative to N4981.
Modify [move.iterator] as indicated:
namespace std { template<class Iterator> class move_iterator { public: […] constexpr reference operator*() const noexcept(noexcept(ranges::iter_move(current))); […] }; }
Modify [move.iter.elem] as indicated:
constexpr reference operator*() const noexcept(noexcept(ranges::iter_move(current)));-1- Effects: Equivalent to: return ranges::iter_move(current);
[ 2024-08-02; Reflector poll ]
Set priority to 4 after reflector poll. "Do we have evidence conditional noexcept matters here? Do we have a policy that `operator*` should be noexcept whenever possible? What criteria are we using to decide here?"
For move_iterator, dereferencing it is actually equivalent to applying iter_move to it.
However, unlike the latter, move_iterator's dereference operator lacks a noexcept specification, which seems to be an oversight given that the standard goes to such great lengths to preserve the noexceptness of iter_move, and the main purpose of move_iterator is precisely to apply iter_move to the underlying iterator via dereferencing.History | |||
---|---|---|---|
Date | User | Action | Args |
2024-08-02 21:14:44 | admin | set | messages: + msg14281 |
2024-07-07 13:22:10 | admin | set | messages: + msg14231 |
2024-07-03 00:00:00 | admin | create |