public inbox for libstdc++@gcc.gnu.org
 help / color / mirror / Atom feed
* [committed] libstdc++: Some minor <ranges> cleanups
@ 2022-08-25 15:12 Patrick Palka
  0 siblings, 0 replies; only message in thread
From: Patrick Palka @ 2022-08-25 15:12 UTC (permalink / raw)
  To: gcc-patches; +Cc: libstdc++, Patrick Palka

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'.
---
 libstdc++-v3/include/std/ranges | 20 ++++----------------
 1 file changed, 4 insertions(+), 16 deletions(-)

diff --git a/libstdc++-v3/include/std/ranges b/libstdc++-v3/include/std/ranges
index c600bad6283..fb815c48f99 100644
--- a/libstdc++-v3/include/std/ranges
+++ b/libstdc++-v3/include/std/ranges
@@ -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>&
-- 
2.37.2.382.g795ea8776b


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-08-25 15:12 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-25 15:12 [committed] libstdc++: Some minor <ranges> cleanups Patrick Palka

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).