A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://en.cppreference.com/w/cpp/language/../algorithm/../iterator/counted_iterator/base.html below:

std::counted_iterator<I>::base - cppreference.com

constexpr const I& base() const& noexcept;

(1) (since C++20)

constexpr I base() &&;

(2) (since C++20)

Returns the underlying base iterator.

1) Returns a reference to the underlying iterator.

2) Move constructs the return value from the underlying iterator.

[edit] Parameters

(none)

[edit] Return value

1) A reference to the underlying iterator.

2) An iterator move constructed from the underlying iterator.

[edit] Exceptions

May throw implementation-defined exceptions.

[edit] Example

Output:

Print with reverse_iterator: 4 3 2 1 0
Print with counted_iterator: 4 3 2
[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 LWG 3391 C++20 the const version of base returns a copy of the underlying iterator returns a reference LWG 3593 C++20 the const version of base returns a reference but might not be noexcept made noexcept [edit] See also

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4