public inbox for libstdc++-cvs@sourceware.org
help / color / mirror / Atom feed
From: Patrick Palka <ppalka@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org, libstdc++-cvs@gcc.gnu.org
Subject: [gcc r13-2202] libstdc++: Some minor <ranges> cleanups
Date: Thu, 25 Aug 2022 15:11:39 +0000 (GMT)	[thread overview]
Message-ID: <20220825151139.3CC7E3858C2F@sourceware.org> (raw)

https://gcc.gnu.org/g:980e0aa0ce3bdfec61ca766a71a31a89c12f882e

commit r13-2202-g980e0aa0ce3bdfec61ca766a71a31a89c12f882e
Author: Patrick Palka <ppalka@redhat.com>
Date:   Thu Aug 25 11:11:04 2022 -0400

    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'.

Diff:
---
 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>&

                 reply	other threads:[~2022-08-25 15:11 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220825151139.3CC7E3858C2F@sourceware.org \
    --to=ppalka@gcc.gnu.org \
    --cc=gcc-cvs@gcc.gnu.org \
    --cc=libstdc++-cvs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).