public inbox for libstdc++@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jonathan Wakely <jwakely@redhat.com>
To: libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org
Subject: [committed] libstdc++: Revert accidentally committed change to bits/stl_iterator.h
Date: Fri, 11 Aug 2023 15:02:28 +0100	[thread overview]
Message-ID: <20230811140303.1390347-1-jwakely@redhat.com> (raw)
In-Reply-To: <CACb0b4kr8O1hns29-T0QXt4vjBZX=D485=6Y9714eVvgkjaaJg@mail.gmail.com>

As promised yesterday, this reverts the part of the change I didn't mean
to commit. Tested x86_64-linux. Pushed to trunk.

-- >8 --

In commit r14-3134-g9cb2a7c8d54b1f I only meant to change some uses of
__clamp_iter_cat to use __iter_category_t, I didn't mean to commit the
additional change introducing __clamped_iter_cat_t. This reverts that
part.

libstdc++-v3/ChangeLog:

	* include/bits/stl_iterator.h (__clamped_iter_cat_t): Remove.
---
 libstdc++-v3/include/bits/stl_iterator.h | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/libstdc++-v3/include/bits/stl_iterator.h b/libstdc++-v3/include/bits/stl_iterator.h
index d5ba05f3e22..b13f4f8ddbf 100644
--- a/libstdc++-v3/include/bits/stl_iterator.h
+++ b/libstdc++-v3/include/bits/stl_iterator.h
@@ -103,10 +103,6 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
       using __clamp_iter_cat
 	= __conditional_t<derived_from<_Cat, _Limit>, _Limit, _Otherwise>;
 
-    template<typename _Iter, typename _Limit>
-      using __clamped_iter_cat_t
-	= __clamp_iter_cat<__iter_category_t<_Iter>, _Limit>;
-
     template<typename _Tp, typename _Up>
       concept __different_from
 	= !same_as<remove_cvref_t<_Tp>, remove_cvref_t<_Up>>;
@@ -172,7 +168,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
 			  random_access_iterator_tag,
 			  bidirectional_iterator_tag>;
       using iterator_category
-	= __detail::__clamped_iter_cat_t<_Iterator, random_access_iterator_tag>;
+	= __detail::__clamp_iter_cat<typename __traits_type::iterator_category,
+				     random_access_iterator_tag>;
       using value_type = iter_value_t<_Iterator>;
       using difference_type = iter_difference_t<_Iterator>;
       using reference = iter_reference_t<_Iterator>;
@@ -1433,7 +1430,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
       struct __move_iter_cat<_Iterator>
       {
 	using iterator_category
-	  = __clamped_iter_cat_t<_Iterator, random_access_iterator_tag>;
+	  = __clamp_iter_cat<__iter_category_t<_Iterator>,
+			     random_access_iterator_tag>;
       };
 #endif
   }
-- 
2.41.0


      reply	other threads:[~2023-08-11 14:03 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-10 22:32 [committed] libstdc++: Use alias template for iterator_category [PR110970] Jonathan Wakely
2023-08-11  0:03 ` Jonathan Wakely
2023-08-11 14:02   ` Jonathan Wakely [this message]

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=20230811140303.1390347-1-jwakely@redhat.com \
    --to=jwakely@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=libstdc++@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).