libstdc++: std::common_iterator< _It, _Sent > Class Template Reference

libstdc++

std::common_iterator< _It, _Sent > Class Template Reference
Iterators

`#include <stl_iterator.h>`

## Public Member Functions
constexpr | common_iterator (_It __i) noexcept(is_nothrow_move_constructible_v< _It >)
constexpr | common_iterator (_Sent __s) noexcept(is_nothrow_move_constructible_v< _Sent >)
| common_iterator (common_iterator &&)=default
constexpr | common_iterator (common_iterator &&__x) noexcept(_S_noexcept< _It, _Sent >())
| common_iterator (const common_iterator &)=default
constexpr | common_iterator (const common_iterator &__x) noexcept(_S_noexcept< const _It &, const _Sent & >())
template<typename _It2, typename _Sent2>
constexpr | common_iterator (const common_iterator< _It2, _Sent2 > &__x) noexcept(_S_noexcept< const _It2 &, const _Sent2 & >())
constexpr decltype(auto) | operator* ()
constexpr decltype(auto) | operator* () const
constexpr common_iterator & | operator++ ()
constexpr decltype(auto) | operator++ (int)
constexpr auto | operator-> () const
constexpr common_iterator & | operator= (common_iterator &&)=default
constexpr common_iterator & | operator= (common_iterator &&__x) noexcept(is_nothrow_move_assignable_v< _It > &&is_nothrow_move_assignable_v< _Sent > &&is_nothrow_move_constructible_v< _It > &&is_nothrow_move_constructible_v< _Sent >)
constexpr common_iterator & | operator= (const common_iterator &)=default
constexpr common_iterator & | operator= (const common_iterator &__x) noexcept(is_nothrow_copy_assignable_v< _It > &&is_nothrow_copy_assignable_v< _Sent > &&is_nothrow_copy_constructible_v< _It > &&is_nothrow_copy_constructible_v< _Sent >)
template<typename _It2, typename _Sent2>
constexpr common_iterator & | operator= (const common_iterator< _It2, _Sent2 > &__x) noexcept(is_nothrow_constructible_v< _It, const _It2 & > &&is_nothrow_constructible_v< _Sent, const _Sent2 & > &&is_nothrow_assignable_v< _It &, const _It2 & > &&is_nothrow_assignable_v< _Sent &, const _Sent2 & >)

## Friends
constexpr iter_rvalue_reference_t< _It > | iter_move (const common_iterator &__i) noexcept(noexcept(ranges::iter_move(std::declval< const _It & >())))
template<indirectly_swappable< _It > _It2, typename _Sent2>
constexpr void | iter_swap (const common_iterator &__x, const common_iterator< _It2, _Sent2 > &__y) noexcept(noexcept(ranges::iter_swap(std::declval< const _It & >(), std::declval< const _It2 & >())))
template<sized_sentinel_for< _It > _It2, sized_sentinel_for< _It > _Sent2>
constexpr iter_difference_t< _It2 > | operator- (const common_iterator &__x, const common_iterator< _It2, _Sent2 > &__y)
template<typename _It2, sentinel_for< _It > _Sent2>
constexpr bool | operator== (const common_iterator &__x, const common_iterator< _It2, _Sent2 > &__y)
template<typename _It2, sentinel_for< _It > _Sent2>
constexpr bool | operator== (const common_iterator &__x, const common_iterator< _It2, _Sent2 > &__y)

## Detailed Description

template<input_or_output_iterator _It, sentinel_for< _It > _Sent>
requires (!same_as<_It, _Sent>) && copyable<_It>
class std::common_iterator< _It, _Sent >

An iterator/sentinel adaptor for representing a non-common range.

Definition at line 1884 of file bits/stl_iterator.h.

## Constructor & Destructor Documentation

## ◆ common_iterator() [1/6]

template<input_or_output_iterator _It, sentinel_for< _It > _Sent>

std::common_iterator< _It, _Sent >::common_iterator | ( |  | ) |
| inlineconstexprnoexcept

Definition at line 1935 of file bits/stl_iterator.h.

## ◆ common_iterator() [2/6]

template<input_or_output_iterator _It, sentinel_for< _It > _Sent>

std::common_iterator< _It, _Sent >::common_iterator | ( | _It | __i | ) |
| inlineconstexprnoexcept

Definition at line 1942 of file bits/stl_iterator.h.

## ◆ common_iterator() [3/6]

template<input_or_output_iterator _It, sentinel_for< _It > _Sent>

std::common_iterator< _It, _Sent >::common_iterator | ( | _Sent | __s | ) |
| inlineconstexprnoexcept

Definition at line 1948 of file bits/stl_iterator.h.

## ◆ common_iterator() [4/6]

template<input_or_output_iterator _It, sentinel_for< _It > _Sent>
template<typename _It2, typename _Sent2>

std::common_iterator< _It, _Sent >::common_iterator | ( | const common_iterator< _It2, _Sent2 > & | __x | ) |
| inlineconstexprnoexcept

Definition at line 1957 of file bits/stl_iterator.h.

## ◆ common_iterator() [5/6]

template<input_or_output_iterator _It, sentinel_for< _It > _Sent>

std::common_iterator< _It, _Sent >::common_iterator | ( | const common_iterator< _It, _Sent > & | __x | ) |
| inlineconstexprnoexcept

Definition at line 1981 of file bits/stl_iterator.h.

## ◆ common_iterator() [6/6]

template<input_or_output_iterator _It, sentinel_for< _It > _Sent>

std::common_iterator< _It, _Sent >::common_iterator | ( | common_iterator< _It, _Sent > && | __x | ) |
| inlineconstexprnoexcept

Definition at line 2005 of file bits/stl_iterator.h.

## ◆ ~common_iterator()

template<input_or_output_iterator _It, sentinel_for< _It > _Sent>

std::common_iterator< _It, _Sent >::~common_iterator | ( |  | ) |
| inlineconstexpr

Definition at line 2080 of file bits/stl_iterator.h.

## Member Function Documentation

## ◆ operator*() [1/2]

template<input_or_output_iterator _It, sentinel_for< _It > _Sent>

decltype(auto) std::common_iterator< _It, _Sent >::operator* | ( |  | ) |
| inlinenodiscardconstexpr

Definition at line 2096 of file bits/stl_iterator.h.

## ◆ operator*() [2/2]

template<input_or_output_iterator _It, sentinel_for< _It > _Sent>

decltype(auto) std::common_iterator< _It, _Sent >::operator* | ( |  | ) | const
| inlinenodiscardconstexpr

Definition at line 2104 of file bits/stl_iterator.h.

## ◆ operator++() [1/2]

template<input_or_output_iterator _It, sentinel_for< _It > _Sent>

common_iterator & std::common_iterator< _It, _Sent >::operator++ | ( |  | ) |
| inlineconstexpr

Definition at line 2127 of file bits/stl_iterator.h.

## ◆ operator++() [2/2]

template<input_or_output_iterator _It, sentinel_for< _It > _Sent>

decltype(auto) std::common_iterator< _It, _Sent >::operator++ | ( | int |  | ) |
| inlineconstexpr

Definition at line 2137 of file bits/stl_iterator.h.

## ◆ operator->()

template<input_or_output_iterator _It, sentinel_for< _It > _Sent>

auto std::common_iterator< _It, _Sent >::operator-> | ( |  | ) | const
| inlinenodiscardconstexpr

Definition at line 2112 of file bits/stl_iterator.h.

## ◆ operator=() [1/3]

template<input_or_output_iterator _It, sentinel_for< _It > _Sent>

common_iterator & std::common_iterator< _It, _Sent >::operator= | ( | common_iterator< _It, _Sent > && | __x | ) |
| inlineconstexprnoexcept

Definition at line 2047 of file bits/stl_iterator.h.

## ◆ operator=() [2/3]

template<input_or_output_iterator _It, sentinel_for< _It > _Sent>

common_iterator & std::common_iterator< _It, _Sent >::operator= | ( | const common_iterator< _It, _Sent > & | __x | ) |
| inlineconstexprnoexcept

Definition at line 2031 of file bits/stl_iterator.h.

## ◆ operator=() [3/3]

template<input_or_output_iterator _It, sentinel_for< _It > _Sent>
template<typename _It2, typename _Sent2>

common_iterator & std::common_iterator< _It, _Sent >::operator= | ( | const common_iterator< _It2, _Sent2 > & | __x | ) |
| inlineconstexprnoexcept

Definition at line 2065 of file bits/stl_iterator.h.

## Friends And Related Symbol Documentation

## ◆ common_iterator

template<input_or_output_iterator _It, sentinel_for< _It > _Sent>
template<input_or_output_iterator _It2, sentinel_for< _It2 > _Sent2>

friend class common_iterator
| friend

Definition at line 2249 of file bits/stl_iterator.h.

## ◆ iter_move

template<input_or_output_iterator _It, sentinel_for< _It > _Sent>

iter_rvalue_reference_t< _It > iter_move | ( | const common_iterator< _It, _Sent > & | __i | ) |
| friend

Definition at line 2226 of file bits/stl_iterator.h.

## ◆ iter_swap

template<input_or_output_iterator _It, sentinel_for< _It > _Sent>
template<indirectly_swappable< _It > _It2, typename _Sent2>

void iter_swap | ( | const common_iterator< _It, _Sent > & | __x,
|  | const common_iterator< _It2, _Sent2 > & | __y )
| friend

Definition at line 2236 of file bits/stl_iterator.h.

## ◆ operator-

template<input_or_output_iterator _It, sentinel_for< _It > _Sent>
template<sized_sentinel_for< _It > _It2, sized_sentinel_for< _It > _Sent2>

iter_difference_t< _It2 > operator- | ( | const common_iterator< _It, _Sent > & | __x,
|  | const common_iterator< _It2, _Sent2 > & | __y )
| friend

Definition at line 2204 of file bits/stl_iterator.h.

## ◆ operator== [1/2]

template<input_or_output_iterator _It, sentinel_for< _It > _Sent>
template<typename _It2, sentinel_for< _It > _Sent2>

bool operator== | ( | const common_iterator< _It, _Sent > & | __x,
|  | const common_iterator< _It2, _Sent2 > & | __y )
| friend

Definition at line 2181 of file bits/stl_iterator.h.

## ◆ operator== [2/2]

template<input_or_output_iterator _It, sentinel_for< _It > _Sent>
template<typename _It2, sentinel_for< _It > _Sent2>

bool operator== | ( | const common_iterator< _It, _Sent > & | __x,
|  | const common_iterator< _It2, _Sent2 > & | __y )
| friend

Definition at line 2159 of file bits/stl_iterator.h.

## Member Data Documentation

## ◆ _M_it

template<input_or_output_iterator _It, sentinel_for< _It > _Sent>

_It std::common_iterator< _It, _Sent >::_M_it

Definition at line 2285 of file bits/stl_iterator.h.

## ◆ _M_sent

template<input_or_output_iterator _It, sentinel_for< _It > _Sent>

_Sent std::common_iterator< _It, _Sent >::_M_sent

Definition at line 2286 of file bits/stl_iterator.h.

## ◆ _M_valueless

template<input_or_output_iterator _It, sentinel_for< _It > _Sent>

unsigned char std::common_iterator< _It, _Sent >::_M_valueless

Definition at line 2287 of file bits/stl_iterator.h.

The documentation for this class was generated from the following file:

- bits/stl_iterator.h