Namespaces
Variants
Views
Actions

Difference between revisions of "cpp/ranges/stride view/iterator/iterator"

From cppreference.com
< cpp‎ | ranges‎ | stride view‎ | iterator
(+page)
 
(Correct a few minor typos in the semantics of (3).)
Line 37: Line 37:
 
@3@ A private constructor which is used by {{lc|stride_view::begin}} and {{lc|stride_view::end}}. This constructor is not accessible to users. Initializes
 
@3@ A private constructor which is used by {{lc|stride_view::begin}} and {{lc|stride_view::end}}. This constructor is not accessible to users. Initializes
 
* {{rlpi|/#Data members|current_}} with {{c|std::move(current)}},
 
* {{rlpi|/#Data members|current_}} with {{c|std::move(current)}},
* {{rlpi|/#Data members|end_}} with {{c|std::move(parent->base_)}},
+
* {{rlpi|/#Data members|end_}} with {{c|ranges::end(parent->base_)}},
* {{rlpi|/#Data members|stride_}} with {{c|parent->stride}},
+
* {{rlpi|/#Data members|stride_}} with {{c|parent->stride_}},
* {{rlpi|/#Data members|missing_}} with {{c|parent->missing}}.
+
* {{rlpi|/#Data members|missing_}} with {{c|missing}}.
  
 
===Parameters===
 
===Parameters===

Revision as of 18:29, 2 August 2023

 
 
Ranges library
Range adaptors
 
 
/*iterator*/()
    requires std::default_initializable<ranges::iterator_t<Base>> = default;
(1) (since C++23)
constexpr /*iterator*/( /*iterator*/<!Const> i )

    requires Const and
        std::convertible_to<ranges::iterator_t<V>, ranges::iterator_t<Base>> and

        std::convertible_to<ranges::sentinel_t<V>, ranges::sentinel_t<Base>>;
(2) (since C++23)
private:

constexpr /*iterator*/( /*Parent*/& parent, // exposition only
                        ranges::iterator_t<Base> current,

                        ranges::range_difference_t<Base> missing = 0 );
(3) (since C++23)

Construct an iterator.

1) Default constructor. Value-initializes:
2) Conversion from /*iterator*/<false> to /*iterator*/<true>. Initializes:
3) A private constructor which is used by stride_view::begin and stride_view::end. This constructor is not accessible to users. Initializes

Parameters

i - an /*iterator*/<false>

Example