Namespaces
Variants
Actions

std::ranges::elements_view<V,F>::iterator<Const>::base

From cppreference.com
< cpp‎ | ranges‎ | elements view‎ | iterator
 
 
Ranges library
Range adaptors
 
 
constexpr const ranges::iterator_t<Base>& base() const & noexcept;
(1)(since C++20)
constexpr ranges::iterator_t<Base> base() &&;
(2)(since C++20)

Returns the underlying iterator.

1) Returns a reference to the underlying iterator.
2) Move constructs the result from the underlying iterator.

Contents

[edit] Parameters

(none)

[edit] Return value

1) A reference to the underlying iterator.
1) An iterator move constructed from the underlying iterator.

[edit] Example

[edit] Defect reports

The following behavior-changing defect reports were applied retroactively to previously published C++ standards.

DRApplied toBehavior as publishedCorrect behavior
LWG 3533C++20the const& overload of base returns a copy of the underlying iteratorreturns a reference
LWG 3593C++20the const& overload of base might not be noexceptmade noexcept