Scroll to navigation

std::ranges::join_with_view::iterator::iterator(3) C++ Standard Libary std::ranges::join_with_view::iterator::iterator(3)

NAME

std::ranges::join_with_view::iterator::iterator - std::ranges::join_with_view::iterator::iterator

Synopsis

/*iterator*/() = default; (1) (since C++23) constexpr /*iterator*/( /*iterator*/<!Const> i )

requires Const && std::convertible_to<ranges::iterator_t<V>, /*OuterIter*/> && (2) (since C++23) std::convertible_to<ranges::iterator_t</*InnerRng*/>, /*InnerIter*/> &&

std::convertible_to<ranges::iterator_t<Pattern>, /*PatternIter*/>; constexpr /*iterator*/( /*Parent*/& parent, /*OuterIter*/ outer ) (3) (since C++23) requires std::forward_range</*Base*/>; (exposition only*) constexpr explicit /*iterator*/( /*Parent*/ parent ) (4) (since C++23) requires (!std::forward_range</*Base*/>); (exposition only*)

Construct an iterator. Overloads (3,4) are called by begin() and end() of ranges::join_with_view.

Overload Data members
parent_ outer_it_ inner_it_
value-initialized (1) initialized with nullptr (only if Base models
forward_range)
initialized with (2) initialized with i.parent_ std::move(i.outer_it_ default-initialized
(only if Base models
forward_range) (3) initialized with initialized with std::move(outer) (4) std::addressof(parent) N/A

2) After initializing the data members, equivalent to

if (i.inner_it_ .index() == 0) inner_it_ .template emplace<0>(std::get<0>(std::move(i.inner_it_ ))); else inner_it_ .template emplace<1>(std::get<1>(std::move(i.inner_it_ )));

3,4) After initializing the data members, adjust the outer iterator as if the inner iterator was incremented by operator++().

Parameters

i - a mutable iterator parent - a std::ranges::join_with_view object outer - an iterator into the underlying range of parent

Example


This section is incomplete
Reason: no example

2026.11.10 http://cppreference.com