std::ranges::elements_view<V,N>::iterator
From cppreference.com
< cpp | ranges | elements view
C++
Feature test macros (C++20)
Concepts library (C++20)
Metaprogramming library (C++11)
Ranges library (C++20)
Filesystem library (C++17)
Concurrency support library (C++11)
Execution control library (C++26)
Ranges library
(exposition-only member type*)
(conditionally present) Not defined, if
(exposition-only member object*)
the return type of ranges::transform_view::begin, and of ranges::transform_view::end when the underlying view is a
(private member class template) [edit]
(C++23)(C++23)
(C++23)(C++23)
(C++23)(C++23)
(C++26)(C++26)
(C++23)(C++23)
(C++23)(C++23)
(C++23)(C++23)
(C++23)(C++23)
(C++23)(C++23)
(C++23)
(C++23)(C++23)
(C++23)
(C++23)(C++23)
(C++23)(C++23)
(C++23)(C++23)
(C++23)(C++23)
(C++23)(C++23)
(C++23)
std::ranges::elements_view
(C++26)
Iterator
template< bool Const >
class /*iterator*/;
(exposition only*)
class /*iterator*/;
The return type of elements_view::begin
, and of elements_view::end
when the underlying view is a common_range
.
The type /*iterator*/<true> is returned by the const-qualified overloads. The type /*iterator*/<false> is returned by the non-const-qualified overloads.
Contents
[edit] Member types
Member type
Definition
Base
(private)
const V if Const
is true, otherwise V
.(exposition-only member type*)
iterator_concept
Denotes:
- std::random_access_iterator_tag , if
Base
modelsrandom_access_range
. Otherwise, - std::bidirectional_iterator_tag , if
Base
modelsbidirectional_range
. Otherwise, - std::forward_iterator_tag , if
Base
modelsforward_range
. Otherwise, - std::input_iterator_tag .
iterator_category
(conditionally present) Not defined, if
Base
does not model forward_range
. Otherwise,
- std::input_iterator_tag , if std::get<N>(*current_) is an rvalue. Otherwise, let
C
be the type std::iterator_traits <std::iterator_t<Base>>::iterator_category. - std::random_access_iterator_tag , if
C
models std::derived_from <std::random_access_iterator_tag >. Otherwise, -
C
.
value_type
std::remove_cvref_t <std::tuple_element_t <N, ranges::range_value_t <Base>>>
difference_type
ranges::range_difference_t <Base>
[edit] Data members
Member object
Definition
current_
(private)
An iterator of type ranges::iterator_t <Base> to current element of underlying sequence.(exposition-only member object*)
[edit] Member functions
[edit] Non-member functions
compares the underlying iterators
(function)
(function)
[edit] Defect reports
The following behavior-changing defect reports were applied retroactively to previously published C++ standards.
DR | Applied to | Behavior as published | Correct behavior |
---|---|---|---|
P2259R1 | C++20 | member iterator_category is always defined
|
defined only if Base models forward_range
|
LWG 3555 | C++20 | the definition of iterator_concept ignores const
|
made to consider |
[edit] See also
(C++20)
common_range
(private member class template) [edit]