std::counted_iterator< _It >(3cxx) | std::counted_iterator< _It >(3cxx) |
NAME¶
std::counted_iterator< _It > - An iterator adaptor that keeps track of the distance to the end.
SYNOPSIS¶
#include <iterator>
Inherits std::__detail::__counted_iter_value_type< _It >, std::__detail::__counted_iter_concept< _It >, and std::__detail::__counted_iter_cat< _It >.
Public Types¶
using difference_type = iter_difference_t< _It >
using iterator_type = _It
Public Member Functions¶
constexpr counted_iterator (_It __i, iter_difference_t<
_It > __n)
template<typename _It2 >
requires convertible_to<const _It2&, _It>constexpr
counted_iterator (const counted_iterator< _It2 >
&__x)"
constexpr _It base ()
&&noexcept(is_nothrow_move_constructible_v< _It >)
constexpr const _It & base () const &noexcept
constexpr iter_difference_t< _It > count () const noexcept
constexpr decltype(auto) operator* () const
noexcept(noexcept(*_M_current))
constexpr decltype(auto) operator* () noexcept(noexcept(*_M_current))
constexpr counted_iterator operator+ (iter_difference_t< _It
> __n) const
constexpr counted_iterator & operator++ ()
constexpr decltype(auto) operator++ (int)
constexpr counted_iterator operator++ (int)
constexpr counted_iterator & operator+=
(iter_difference_t< _It > __n)
constexpr counted_iterator operator- (iter_difference_t< _It
> __n) const
constexpr counted_iterator & operator-- ()
constexpr counted_iterator operator-- (int)
constexpr counted_iterator & operator-=
(iter_difference_t< _It > __n)
constexpr auto operator-> () const noexcept
template<typename _It2 >
requires assignable_from<_It&, const _It2&>constexpr
counted_iterator & operator= (const
counted_iterator< _It2 > &__x)"
constexpr decltype(auto) operator[] (iter_difference_t< _It >
__n) const noexcept(noexcept(_M_current[__n]))
Friends¶
constexpr iter_rvalue_reference_t< _It > iter_move
(const counted_iterator &__i)
noexcept(noexcept(ranges::iter_move(__i._M_current)))
template<indirectly_swappable< _It > _It2> constexpr void
iter_swap (const counted_iterator &__x, const
counted_iterator< _It2 > &__y)
noexcept(noexcept(ranges::iter_swap(__x._M_current, __y._M_current)))
constexpr counted_iterator operator+ (iter_difference_t< _It
> __n, const counted_iterator &__x)
template<common_with< _It > _It2> constexpr iter_difference_t<
_It2 > operator- (const counted_iterator &__x, const
counted_iterator< _It2 > &__y)
constexpr iter_difference_t< _It > operator- (const
counted_iterator &__x, default_sentinel_t)
constexpr iter_difference_t< _It > operator- (default_sentinel_t,
const counted_iterator &__y)
template<common_with< _It > _It2> constexpr strong_ordering
operator<=> (const counted_iterator &__x, const
counted_iterator< _It2 > &__y)
template<common_with< _It > _It2> constexpr bool operator==
(const counted_iterator &__x, const counted_iterator<
_It2 > &__y)
constexpr bool operator== (const counted_iterator &__x,
default_sentinel_t)
Detailed Description¶
template<input_or_output_iterator _It>¶
class std::counted_iterator< _It >"An iterator adaptor that keeps track of the distance to the end.
Definition at line 2306 of file bits/iterator.
Member Typedef Documentation¶
template<input_or_output_iterator _It> using std::counted_iterator< _It >::difference_type = iter_difference_t<_It>¶
Definition at line 2314 of file bits/iterator.
template<input_or_output_iterator _It> using std::counted_iterator< _It >::iterator_type = _It¶
Definition at line 2312 of file bits/iterator.
Constructor & Destructor Documentation¶
template<input_or_output_iterator _It> constexpr std::counted_iterator< _It >::counted_iterator (_It __i, iter_difference_t< _It > __n) [inline], [constexpr]¶
Definition at line 2321 of file bits/iterator.
template<input_or_output_iterator _It> template<typename _It2 > ¶
requires convertible_to<const _It2&, _It>constexpr std::counted_iterator< _It >::counted_iterator (const counted_iterator< _It2 > & __x) [inline], [constexpr]"
Definition at line 2328 of file bits/iterator.
Member Function Documentation¶
template<input_or_output_iterator _It> constexpr _It std::counted_iterator< _It >::base () && [inline], [constexpr], [noexcept]¶
Definition at line 2349 of file bits/iterator.
template<input_or_output_iterator _It> constexpr const _It & std::counted_iterator< _It >::base () const & [inline], [constexpr], [noexcept]¶
Definition at line 2344 of file bits/iterator.
template<input_or_output_iterator _It> constexpr iter_difference_t< _It > std::counted_iterator< _It >::count () const [inline], [constexpr], [noexcept]¶
Definition at line 2355 of file bits/iterator.
template<input_or_output_iterator _It> constexpr decltype(auto) std::counted_iterator< _It >::operator* () const [inline], [constexpr], [noexcept]¶
Definition at line 2368 of file bits/iterator.
template<input_or_output_iterator _It> constexpr decltype(auto) std::counted_iterator< _It >::operator* () [inline], [constexpr], [noexcept]¶
Definition at line 2359 of file bits/iterator.
template<input_or_output_iterator _It> constexpr counted_iterator std::counted_iterator< _It >::operator+ (iter_difference_t< _It > __n) const [inline], [constexpr]¶
Definition at line 2431 of file bits/iterator.
template<input_or_output_iterator _It> constexpr counted_iterator & std::counted_iterator< _It >::operator++ () [inline], [constexpr]¶
Definition at line 2383 of file bits/iterator.
template<input_or_output_iterator _It> constexpr decltype(auto) std::counted_iterator< _It >::operator++ (int) [inline], [constexpr]¶
Definition at line 2392 of file bits/iterator.
template<input_or_output_iterator _It> constexpr counted_iterator std::counted_iterator< _It >::operator++ (int) [inline], [constexpr]¶
Definition at line 2406 of file bits/iterator.
template<input_or_output_iterator _It> constexpr counted_iterator & std::counted_iterator< _It >::operator+= (iter_difference_t< _It > __n) [inline], [constexpr]¶
Definition at line 2442 of file bits/iterator.
template<input_or_output_iterator _It> constexpr counted_iterator std::counted_iterator< _It >::operator- (iter_difference_t< _It > __n) const [inline], [constexpr]¶
Definition at line 2453 of file bits/iterator.
template<input_or_output_iterator _It> constexpr counted_iterator & std::counted_iterator< _It >::operator-- () [inline], [constexpr]¶
Definition at line 2414 of file bits/iterator.
template<input_or_output_iterator _It> constexpr counted_iterator std::counted_iterator< _It >::operator-- (int) [inline], [constexpr]¶
Definition at line 2422 of file bits/iterator.
template<input_or_output_iterator _It> constexpr counted_iterator & std::counted_iterator< _It >::operator-= (iter_difference_t< _It > __n) [inline], [constexpr]¶
Definition at line 2475 of file bits/iterator.
template<input_or_output_iterator _It> constexpr auto std::counted_iterator< _It >::operator-> () const [inline], [constexpr], [noexcept]¶
Definition at line 2378 of file bits/iterator.
template<input_or_output_iterator _It> template<typename _It2 > ¶
requires assignable_from<_It&, const _It2&>constexpr counted_iterator & std::counted_iterator< _It >::operator= (const counted_iterator< _It2 > & __x) [inline], [constexpr]"
Definition at line 2335 of file bits/iterator.
template<input_or_output_iterator _It> constexpr decltype(auto) std::counted_iterator< _It >::operator[] (iter_difference_t< _It > __n) const [inline], [constexpr], [noexcept]¶
Definition at line 2486 of file bits/iterator.
Friends And Related Function Documentation¶
template<input_or_output_iterator _It> template<input_or_output_iterator _It2> friend class counted_iterator [friend]¶
Definition at line 2534 of file bits/iterator.
template<input_or_output_iterator _It> constexpr iter_rvalue_reference_t< _It > iter_move (const counted_iterator< _It > & __i) [friend]¶
Definition at line 2515 of file bits/iterator.
template<input_or_output_iterator _It> template<indirectly_swappable< _It > _It2> constexpr void iter_swap (const counted_iterator< _It > & __x, const counted_iterator< _It2 > & __y) [friend]¶
Definition at line 2525 of file bits/iterator.
template<input_or_output_iterator _It> constexpr counted_iterator operator+ (iter_difference_t< _It > __n, const counted_iterator< _It > & __x) [friend]¶
Definition at line 2437 of file bits/iterator.
template<input_or_output_iterator _It> template<common_with< _It > _It2> constexpr iter_difference_t< _It2 > operator- (const counted_iterator< _It > & __x, const counted_iterator< _It2 > & __y) [friend]¶
Definition at line 2460 of file bits/iterator.
template<input_or_output_iterator _It> constexpr iter_difference_t< _It > operator- (const counted_iterator< _It > & __x, default_sentinel_t) [friend]¶
Definition at line 2466 of file bits/iterator.
template<input_or_output_iterator _It> constexpr iter_difference_t< _It > operator- (default_sentinel_t, const counted_iterator< _It > & __y) [friend]¶
Definition at line 2471 of file bits/iterator.
template<input_or_output_iterator _It> template<common_with< _It > _It2> constexpr strong_ordering operator<=> (const counted_iterator< _It > & __x, const counted_iterator< _It2 > & __y) [friend]¶
Definition at line 2508 of file bits/iterator.
template<input_or_output_iterator _It> template<common_with< _It > _It2> constexpr bool operator== (const counted_iterator< _It > & __x, const counted_iterator< _It2 > & __y) [friend]¶
Definition at line 2497 of file bits/iterator.
template<input_or_output_iterator _It> constexpr bool operator== (const counted_iterator< _It > & __x, default_sentinel_t) [friend]¶
Definition at line 2503 of file bits/iterator.
Author¶
Generated automatically by Doxygen for libstdc++ from the source code.
Sun Jan 8 2023 | libstdc++ |