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 via email to