libstdc++: Some minor <ranges> cleanups

libstdc++-v3/ChangeLog:

	* include/std/ranges (lazy_split_view::_OuterIter::_M_current):
	Remove redundant comment.
	(lazy_split_view::_M_current): Likewise.
	(common_view::common_view): Remove commented out view-converting
	constructor as per LWG3405.
	(elements_view::_Iterator::_Iterator): Uglify 'current' and 'i'.
This commit is contained in:
Patrick Palka 2022-08-25 11:11:04 -04:00
parent 585a21bab3
commit 980e0aa0ce

View File

@ -3116,7 +3116,6 @@ namespace views::__adaptor
_Parent* _M_parent = nullptr;
// XXX: _M_current is present only if "V models forward_range"
[[no_unique_address]]
__detail::__maybe_present_t<forward_range<_Vp>,
iterator_t<_Base>> _M_current;
@ -3370,7 +3369,6 @@ namespace views::__adaptor
_Vp _M_base = _Vp();
_Pattern _M_pattern = _Pattern();
// XXX: _M_current is "present only if !forward_range<V>"
[[no_unique_address]]
__detail::__maybe_present_t<!forward_range<_Vp>,
__detail::__non_propagating_cache<iterator_t<_Vp>>> _M_current;
@ -3725,16 +3723,6 @@ namespace views::__adaptor
: _M_base(std::move(__r))
{ }
/* XXX: LWG 3280 didn't remove this constructor, but I think it should?
template<viewable_range _Range>
requires (!common_range<_Range>)
&& constructible_from<_Vp, views::all_t<_Range>>
constexpr explicit
common_view(_Range&& __r)
: _M_base(views::all(std::forward<_Range>(__r)))
{ }
*/
constexpr _Vp
base() const& requires copy_constructible<_Vp>
{ return _M_base; }
@ -4115,14 +4103,14 @@ namespace views::__adaptor
_Iterator() requires default_initializable<iterator_t<_Base>> = default;
constexpr explicit
_Iterator(iterator_t<_Base> current)
: _M_current(std::move(current))
_Iterator(iterator_t<_Base> __current)
: _M_current(std::move(__current))
{ }
constexpr
_Iterator(_Iterator<!_Const> i)
_Iterator(_Iterator<!_Const> __i)
requires _Const && convertible_to<iterator_t<_Vp>, iterator_t<_Base>>
: _M_current(std::move(i._M_current))
: _M_current(std::move(__i._M_current))
{ }
constexpr const iterator_t<_Base>&