for (; _M_outer != ranges::end(_M_parent->_M_base); ++_M_outer)
{
- auto& inner = __update_inner(*_M_outer);
- _M_inner = ranges::begin(inner);
- if (_M_inner != ranges::end(inner))
+ auto& __inner = __update_inner(*_M_outer);
+ _M_inner = ranges::begin(__inner);
+ if (_M_inner != ranges::end(__inner))
return;
}
operator*() const
{ return *_M_inner; }
- constexpr _Outer_iter
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 3500. join_view::iterator::operator->() is bogus
+ constexpr _Inner_iter
operator->() const
- requires __detail::__has_arrow<_Outer_iter>
- && copyable<_Outer_iter>
+ requires __detail::__has_arrow<_Inner_iter>
+ && copyable<_Inner_iter>
{ return _M_inner; }
constexpr _Iterator&
static_assert( std::same_as<std::ranges::range_value_t<V>, int> );
}
+void
+test08()
+{
+ // LWG 3500. join_view::iterator::operator->() is bogus
+ struct X { int a; };
+ ranges::single_view<ranges::single_view<X>> s{std::in_place, std::in_place, 5};
+ auto v = s | views::join;
+ auto i = v.begin();
+ VERIFY( i->a == 5 );
+}
+
int
main()
{
test05();
test06();
test07();
+ test08();
}