libstdc++: Fix up implementation of LWG 3533 [PR101589]
In r12-569 I accidentally applied the LWG 3533 change to elements_view::iterator::base instead to elements_view::base. This patch corrects this, and also applies the corresponding LWG 3533 change to lazy_split_view::inner-iter::base now that we implement P2210. PR libstdc++/101589 libstdc++-v3/ChangeLog: * include/std/ranges (lazy_split_view::_InnerIter::base): Make the const& overload unconstrained and return a const reference as per LWG 3533. Make unconditionally noexcept. (elements_view::base): Revert accidental r12-569 change. (elements_view::_Iterator::base): Make the const& overload unconstrained and return a const reference as per LWG 3533. Make unconditionally noexcept.
This commit is contained in:
parent
0e1bb3c88c
commit
4414057186
1 changed files with 6 additions and 7 deletions
|
@ -3103,8 +3103,8 @@ namespace views::__adaptor
|
|||
: _M_i(std::move(__i))
|
||||
{ }
|
||||
|
||||
constexpr iterator_t<_Base>
|
||||
base() const& requires copyable<iterator_t<_Base>>
|
||||
constexpr const iterator_t<_Base>&
|
||||
base() const& noexcept
|
||||
{ return _M_i_current(); }
|
||||
|
||||
constexpr iterator_t<_Base>
|
||||
|
@ -3786,8 +3786,8 @@ namespace views::__adaptor
|
|||
: _M_base(std::move(base))
|
||||
{ }
|
||||
|
||||
constexpr const _Vp&
|
||||
base() const & noexcept
|
||||
constexpr _Vp
|
||||
base() const& requires copy_constructible<_Vp>
|
||||
{ return _M_base; }
|
||||
|
||||
constexpr _Vp
|
||||
|
@ -3913,9 +3913,8 @@ namespace views::__adaptor
|
|||
: _M_current(std::move(i._M_current))
|
||||
{ }
|
||||
|
||||
constexpr iterator_t<_Base>
|
||||
base() const&
|
||||
requires copyable<iterator_t<_Base>>
|
||||
constexpr const iterator_t<_Base>&
|
||||
base() const& noexcept
|
||||
{ return _M_current; }
|
||||
|
||||
constexpr iterator_t<_Base>
|
||||
|
|
Loading…
Add table
Reference in a new issue