[gcc r12-1662] libstdc++: Define split_view::_InnerIter::base as per P2210

Patrick Palka ppalka@gcc.gnu.org
Sun Jun 20 16:50:59 GMT 2021


https://gcc.gnu.org/g:85a594f7dc8ea5c765e136f162debb668139ebd4

commit r12-1662-g85a594f7dc8ea5c765e136f162debb668139ebd4
Author: Patrick Palka <ppalka@redhat.com>
Date:   Sun Jun 20 12:38:35 2021 -0400

    libstdc++: Define split_view::_InnerIter::base as per P2210
    
    libstdc++-v3/ChangeLog:
    
            * include/std/ranges (split_view::_InnerIter::base): Define as
            per P2210.

Diff:
---
 libstdc++-v3/include/std/ranges | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/libstdc++-v3/include/std/ranges b/libstdc++-v3/include/std/ranges
index 49babe81437..7cb8b2da506 100644
--- a/libstdc++-v3/include/std/ranges
+++ b/libstdc++-v3/include/std/ranges
@@ -3086,6 +3086,14 @@ namespace views::__adaptor
 	    : _M_i(std::move(__i))
 	  { }
 
+	  constexpr iterator_t<_Base>
+	  base() const& requires copyable<iterator_t<_Base>>
+	  { return _M_i_current(); }
+
+	  constexpr iterator_t<_Base>
+	  base() &&
+	  { return std::move(_M_i_current()); }
+
 	  constexpr decltype(auto)
 	  operator*() const
 	  { return *_M_i_current(); }


More information about the Libstdc++-cvs mailing list