Created on 2021-05-28.00:00:00 last changed 42 months ago
Proposed resolution:
This wording is relative to N4885.
Modify [range.elements.sentinel] as indicated:
[…][…] template<bool OtherConst> requires sized_sentinel_for<sentinel_t<Base>, iterator_t<maybe-const<OtherConst, V>>> friend constexpr range_difference_t<Basemaybe-const<OtherConst, V>> operator-(const iterator<OtherConst>& x, const sentinel& y); template<bool OtherConst> requires sized_sentinel_for<sentinel_t<Base>, iterator_t<maybe-const<OtherConst, V>>> friend constexpr range_difference_t<maybe-const<OtherConst, V>> operator-(const sentinel& x, const iterator<OtherConst>& y); }; }template<bool OtherConst> requires sized_sentinel_for<sentinel_t<Base>, iterator_t<maybe-const<OtherConst, V>>> friend constexpr range_difference_t<Basemaybe-const<OtherConst, V>> operator-(const iterator<OtherConst>& x, const sentinel& y);-5- Effects: Equivalent to: return x.current_ - y.end_;
[ 2021-06-07 Fixed by editorial issue #4603. Status changed: New → NAD Editorial. ]
Because the iterator type of the first operator- is const iterator<OtherConst>&, its return type should be range_difference_t<maybe-const<OtherConst, V>>.
History | |||
---|---|---|---|
Date | User | Action | Args |
2021-06-07 17:01:00 | admin | set | messages: + msg11917 |
2021-06-07 17:01:00 | admin | set | status: new -> nad editorial |
2021-05-28 17:57:49 | admin | set | messages: + msg11863 |
2021-05-28 00:00:00 | admin | create |