libstdc++: ranges File Reference

libstdc++

ranges File Reference
Utilities » Concepts

Go to the source code of this file.

## Classes
class | std::ranges::empty_view< _Tp >
class | std::ranges::single_view< _Tp >

## Namespaces
namespace | std

## Typedefs
template<typename _Fn, typename... _Iters>
using | std::ranges::__detail::__func_handle_t
template<typename _Wp>
using | std::ranges::__detail::__iota_diff_t
template<bool _Const, typename _Tp>
using | std::ranges::__detail::__maybe_const_t
template<bool _Const, typename _Tp>
using | std::ranges::__maybe_const_t
template<bool _Present, typename _Tp, int _Disc = 0>
using | std::ranges::__detail::__maybe_present_t
template<viewable_range _Range>
using | std::ranges::views::all_t
template<typename _Val>
using | std::ranges::istream_view
template<typename _Range>
using | std::ranges::keys_view
template<typename _Range>
using | std::ranges::values_view
template<typename _Val>
using | std::ranges::wistream_view

## Functions
template<typename _Tp>
constexpr _Tp & | std::ranges::__detail::__as_lvalue (_Tp &&__t)
template<typename _Range>
constexpr auto | std::ranges::views::__detail::__drop_of_repeat_view (_Range &&, range_difference_t< _Range >)
template<typename _Tp, typename _Up> requires (!same_as<_Tp, _RangeAdaptorClosure<_Up>>)
void | std::ranges::views::__adaptor::__is_range_adaptor_closure_fn (const _Tp &, const _RangeAdaptorClosure< _Up > &)
template<typename _Fn, typename... _Iters>
consteval auto | std::ranges::__detail::__func_handle::__select ()
template<typename _Range>
constexpr auto | std::ranges::views::__detail::__take_of_repeat_view (_Range &&, range_difference_t< _Range >)
template<typename _Wp>
constexpr auto | std::ranges::__detail::__to_signed_like (_Wp __w) noexcept
template<typename _Range>
| std::ranges::common_view (_Range &&) -> common_view< views::all_t< _Range > >
template<typename _Range>
| std::ranges::drop_view (_Range &&, range_difference_t< _Range >) -> drop_view< views::all_t< _Range > >
template<typename _Range, typename _Pred>
| std::ranges::drop_while_view (_Range &&, _Pred) -> drop_while_view< views::all_t< _Range >, _Pred >
template<typename _Range, typename _Pred>
| std::ranges::filter_view (_Range &&, _Pred) -> filter_view< views::all_t< _Range >, _Pred >
template<typename _Winc, typename _Bound> requires (!__detail::__is_integer_like<_Winc> || !__detail::__is_integer_like<_Bound> || (__detail::__is_signed_integer_like<_Winc> == __detail::__is_signed_integer_like<_Bound>))
| std::ranges::iota_view (_Winc, _Bound) -> iota_view< _Winc, _Bound >
template<typename _Range>
| std::ranges::join_view (_Range &&) -> join_view< views::all_t< _Range > >
template<typename _Range, typename _Pattern>
| std::ranges::lazy_split_view (_Range &&, _Pattern &&) -> lazy_split_view< views::all_t< _Range >, views::all_t< _Pattern > >
template<input_range _Range>
| std::ranges::lazy_split_view (_Range &&, range_value_t< _Range >) -> lazy_split_view< views::all_t< _Range >, single_view< range_value_t< _Range > > >
template<typename _Lhs, typename _Rhs> requires __is_range_adaptor_closure<_Lhs> && __is_range_adaptor_closure<_Rhs>
constexpr auto | std::ranges::views::__adaptor::operator| (_Lhs &&__lhs, _Rhs &&__rhs)
template<typename _Self, typename _Range> requires __is_range_adaptor_closure<_Self> && __adaptor_invocable<_Self, _Range>
constexpr auto | std::ranges::views::__adaptor::operator| (_Range &&__r, _Self &&__self)
template<typename _Range>
| std::ranges::ref_view (_Range &) -> ref_view< _Range >
template<typename _Range>
| std::ranges::reverse_view (_Range &&) -> reverse_view< views::all_t< _Range > >
template<typename _Tp>
| std::ranges::single_view (_Tp) -> single_view< _Tp >
template<typename _Range, typename _Pattern>
| std::ranges::split_view (_Range &&, _Pattern &&) -> split_view< views::all_t< _Range >, views::all_t< _Pattern > >
template<forward_range _Range>
| std::ranges::split_view (_Range &&, range_value_t< _Range >) -> split_view< views::all_t< _Range >, single_view< range_value_t< _Range > > >
template<typename _Range>
| std::ranges::take_view (_Range &&, range_difference_t< _Range >) -> take_view< views::all_t< _Range > >
template<typename _Range, typename _Pred>
| std::ranges::take_while_view (_Range &&, _Pred) -> take_while_view< views::all_t< _Range >, _Pred >
template<typename _Range, typename _Fp>
| std::ranges::transform_view (_Range &&, _Fp) -> transform_view< views::all_t< _Range >, _Fp >

## Variables
template<typename _Range>
constexpr bool | std::ranges::views::__detail::__is_basic_string_view
template<typename _CharT, typename _Traits>
constexpr bool | std::ranges::views::__detail::__is_basic_string_view< basic_string_view< _CharT, _Traits > >
template<typename _Range>
constexpr bool | std::ranges::views::__detail::__is_empty_view
template<typename _Tp>
constexpr bool | std::ranges::views::__detail::__is_empty_view< empty_view< _Tp > >
template<typename _Range>
constexpr bool | std::ranges::views::__detail::__is_iota_view
template<typename _Winc, typename _Bound>
constexpr bool | std::ranges::views::__detail::__is_iota_view< iota_view< _Winc, _Bound > >
template<typename _Range>
constexpr bool | std::ranges::views::__detail::__is_repeat_view
template<typename>
constexpr bool | std::ranges::views::__detail::__is_reverse_view
template<typename _Vp>
constexpr bool | std::ranges::views::__detail::__is_reverse_view< reverse_view< _Vp > >
template<typename>
constexpr bool | std::ranges::views::__detail::__is_reversible_subrange
template<typename _Iter, subrange_kind _Kind>
constexpr bool | std::ranges::views::__detail::__is_reversible_subrange< subrange< reverse_iterator< _Iter >, reverse_iterator< _Iter >, _Kind > >
template<typename _Range>
constexpr bool | std::ranges::views::__detail::__is_subrange
constexpr _All | std::ranges::views::all
constexpr _Common | std::ranges::views::common
constexpr _Counted | std::ranges::views::counted
constexpr _Drop | std::ranges::views::drop
constexpr _DropWhile | std::ranges::views::drop_while
template<size_t _Nm>
constexpr _Elements< _Nm > | std::ranges::views::elements
template<typename _Tp>
constexpr empty_view< _Tp > | std::ranges::views::empty
template<typename _Tp>
constexpr bool | std::ranges::enable_borrowed_range< common_view< _Tp > >
template<typename _Tp>
constexpr bool | std::ranges::enable_borrowed_range< drop_view< _Tp > >
template<typename _Tp, typename _Pred>
constexpr bool | std::ranges::enable_borrowed_range< drop_while_view< _Tp, _Pred > >
template<typename _Tp, size_t _Nm>
constexpr bool | std::ranges::enable_borrowed_range< elements_view< _Tp, _Nm > >
template<typename _Tp>
constexpr bool | std::ranges::enable_borrowed_range< empty_view< _Tp > >
template<typename _Winc, typename _Bound>
constexpr bool | std::ranges::enable_borrowed_range< iota_view< _Winc, _Bound > >
template<typename _Tp>
constexpr bool | std::ranges::enable_borrowed_range< owning_view< _Tp > >
template<typename _Tp>
constexpr bool | std::ranges::enable_borrowed_range< ref_view< _Tp > >
template<typename _Tp>
constexpr bool | std::ranges::enable_borrowed_range< reverse_view< _Tp > >
template<typename _Tp>
constexpr bool | std::ranges::enable_borrowed_range< take_view< _Tp > >
constexpr _Filter | std::ranges::views::filter
constexpr _Iota | std::ranges::views::iota
template<typename _Tp>
constexpr _Istream< _Tp > | std::ranges::views::istream
constexpr _Join | std::ranges::views::join
constexpr auto | std::ranges::views::keys
constexpr _LazySplit | std::ranges::views::lazy_split
constexpr _Reverse | std::ranges::views::reverse
constexpr _Single | std::ranges::views::single
constexpr _Split | std::ranges::views::split
constexpr _Take | std::ranges::views::take
constexpr _TakeWhile | std::ranges::views::take_while
constexpr _Transform | std::ranges::views::transform
constexpr auto | std::ranges::views::values

## Detailed Description

This is a Standard C++ Library header.

Definition in file ranges.

## Typedef Documentation

## ◆ __func_handle_t

template<typename _Fn, typename... _Iters>

using std::ranges::__detail::__func_handle_t

Definition at line 423 of file ranges.

## ◆ __iota_diff_t

template<typename _Wp>

using std::ranges::__detail::__iota_diff_t

Definition at line 524 of file ranges.

## ◆ __maybe_const_t [1/2]

template<bool _Const, typename _Tp>

using std::ranges::__detail::__maybe_const_t

Definition at line 1059 of file ranges.

## ◆ __maybe_const_t [2/2]

template<bool _Const, typename _Tp>

using std::ranges::__detail::__maybe_const_t

Definition at line 1059 of file ranges.

## ◆ __maybe_present_t

template<bool _Present, typename _Tp, int _Disc = 0>

using std::ranges::__detail::__maybe_present_t

Definition at line 1055 of file ranges.

## ◆ all_t

template<viewable_range _Range>

using std::ranges::views::all_t

Definition at line 1528 of file ranges.

## ◆ istream_view

template<typename _Val>

using std::ranges::istream_view

Definition at line 1011 of file ranges.

## ◆ keys_view

template<typename _Range>

using std::ranges::keys_view

Definition at line 4703 of file ranges.

## ◆ values_view

template<typename _Range>

using std::ranges::values_view

Definition at line 4706 of file ranges.

## ◆ wistream_view

template<typename _Val>

using std::ranges::wistream_view

Definition at line 1014 of file ranges.

## Function Documentation

## ◆ __as_lvalue()

template<typename _Tp>

_Tp & std::ranges::__detail::__as_lvalue | ( | _Tp && | __t | ) |
| constexpr

Definition at line 2990 of file ranges.

## ◆ __select()

template<typename _Fn, typename... _Iters>

auto std::ranges::__detail::__func_handle::__select | ( |  | ) |
| consteval

Definition at line 405 of file ranges.

## ◆ __to_signed_like()

template<typename _Wp>

auto std::ranges::__detail::__to_signed_like | ( | _Wp | __w | ) |
| constexprnoexcept

Definition at line 505 of file ranges.

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

template<typename _Lhs, typename _Rhs>
requires __is_range_adaptor_closure<_Lhs> && __is_range_adaptor_closure<_Rhs>

auto std::ranges::views::__adaptor::operator| | ( | _Lhs && | __lhs,
|  | _Rhs && | __rhs )
| constexpr

Definition at line 1119 of file ranges.

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

template<typename _Self, typename _Range>
requires __is_range_adaptor_closure<_Self> && __adaptor_invocable<_Self, _Range>

auto std::ranges::views::__adaptor::operator| | ( | _Range && | __r,
|  | _Self && | __self )
| constexpr

Definition at line 1110 of file ranges.

## Variable Documentation

## ◆ __is_basic_string_view

template<typename _Range>

bool std::ranges::views::__detail::__is_basic_string_view
| inlineconstexpr

Definition at line 2537 of file ranges.

## ◆ __is_basic_string_view< basic_string_view< _CharT, _Traits > >

template<typename _CharT, typename _Traits>

bool std::ranges::views::__detail::__is_basic_string_view< basic_string_view< _CharT, _Traits > >
| inlineconstexpr

Definition at line 2540 of file ranges.

## ◆ __is_empty_view

template<typename _Range>

bool std::ranges::views::__detail::__is_empty_view
| inlineconstexpr

Definition at line 2531 of file ranges.

## ◆ __is_empty_view< empty_view< _Tp > >

template<typename _Tp>

bool std::ranges::views::__detail::__is_empty_view< empty_view< _Tp > >
| inlineconstexpr

Definition at line 2534 of file ranges.

## ◆ __is_iota_view

template<typename _Range>

bool std::ranges::views::__detail::__is_iota_view
| inlineconstexpr

Definition at line 2546 of file ranges.

## ◆ __is_iota_view< iota_view< _Winc, _Bound > >

template<typename _Winc, typename _Bound>

bool std::ranges::views::__detail::__is_iota_view< iota_view< _Winc, _Bound > >
| inlineconstexpr

Definition at line 2549 of file ranges.

## ◆ __is_repeat_view

template<typename _Range>

bool std::ranges::views::__detail::__is_repeat_view
| inlineconstexpr

Definition at line 2552 of file ranges.

## ◆ __is_reverse_view

template<typename>

bool std::ranges::views::__detail::__is_reverse_view
| inlineconstexpr

Definition at line 4307 of file ranges.

## ◆ __is_reverse_view< reverse_view< _Vp > >

template<typename _Vp>

bool std::ranges::views::__detail::__is_reverse_view< reverse_view< _Vp > >
| inlineconstexpr

Definition at line 4310 of file ranges.

## ◆ __is_reversible_subrange

template<typename>

bool std::ranges::views::__detail::__is_reversible_subrange
| inlineconstexpr

Definition at line 4298 of file ranges.

## ◆ __is_reversible_subrange< subrange< reverse_iterator< _Iter >, reverse_iterator< _Iter >, _Kind > >

template<typename _Iter, subrange_kind _Kind>

bool std::ranges::views::__detail::__is_reversible_subrange< subrange< reverse_iterator< _Iter >, reverse_iterator< _Iter >, _Kind > >
| inlineconstexpr

Definition at line 4301 of file ranges.

## ◆ __is_subrange

template<typename _Range>

bool std::ranges::__detail::__is_subrange
| inlineconstexpr

Definition at line 665 of file utility.h.

## ◆ all

_All std::ranges::views::all
| inlineconstexpr

Definition at line 1525 of file ranges.

## ◆ common

_Common std::ranges::views::common
| inlineconstexpr

Definition at line 4213 of file ranges.

## ◆ counted

_Counted std::ranges::views::counted
| inlineconstexpr

Definition at line 4099 of file ranges.

## ◆ drop

_Drop std::ranges::views::drop
| inlineconstexpr

Definition at line 2896 of file ranges.

## ◆ drop_while

_DropWhile std::ranges::views::drop_while
| inlineconstexpr

Definition at line 2983 of file ranges.

## ◆ elements

template<size_t _Nm>

_Elements<_Nm> std::ranges::views::elements
| inlineconstexpr

Definition at line 4732 of file ranges.

## ◆ empty

template<typename _Tp>

empty_view<_Tp> std::ranges::views::empty
| inlineconstexpr

Definition at line 875 of file ranges.

## ◆ enable_borrowed_range< common_view< _Tp > >

template<typename _Tp>

bool std::ranges::enable_borrowed_range< common_view< _Tp > >
| inlineconstexpr

Definition at line 4180 of file ranges.

## ◆ enable_borrowed_range< drop_view< _Tp > >

template<typename _Tp>

bool std::ranges::enable_borrowed_range< drop_view< _Tp > >
| inlineconstexpr

Definition at line 2827 of file ranges.

## ◆ enable_borrowed_range< drop_while_view< _Tp, _Pred > >

template<typename _Tp, typename _Pred>

bool std::ranges::enable_borrowed_range< drop_while_view< _Tp, _Pred > >
| inlineconstexpr

Definition at line 2955 of file ranges.

## ◆ enable_borrowed_range< elements_view< _Tp, _Nm > >

template<typename _Tp, size_t _Nm>

bool std::ranges::enable_borrowed_range< elements_view< _Tp, _Nm > >
| inlineconstexpr

Definition at line 4697 of file ranges.

## ◆ enable_borrowed_range< empty_view< _Tp > >

template<typename _Tp>

bool std::ranges::enable_borrowed_range< empty_view< _Tp > >
| inlineconstexpr

Definition at line 119 of file ranges.

## ◆ enable_borrowed_range< iota_view< _Winc, _Bound > >

template<typename _Winc, typename _Bound>

bool std::ranges::enable_borrowed_range< iota_view< _Winc, _Bound > >
| inlineconstexpr

Definition at line 869 of file ranges.

## ◆ enable_borrowed_range< owning_view< _Tp > >

template<typename _Tp>

bool std::ranges::enable_borrowed_range< owning_view< _Tp > >
| inlineconstexpr

Definition at line 1478 of file ranges.

## ◆ enable_borrowed_range< ref_view< _Tp > >

template<typename _Tp>

bool std::ranges::enable_borrowed_range< ref_view< _Tp > >
| inlineconstexpr

Definition at line 1398 of file ranges.

## ◆ enable_borrowed_range< reverse_view< _Tp > >

template<typename _Tp>

bool std::ranges::enable_borrowed_range< reverse_view< _Tp > >
| inlineconstexpr

Definition at line 4290 of file ranges.

## ◆ enable_borrowed_range< take_view< _Tp > >

template<typename _Tp>

bool std::ranges::enable_borrowed_range< take_view< _Tp > >
| inlineconstexpr

Definition at line 2523 of file ranges.

## ◆ filter

_Filter std::ranges::views::filter
| inlineconstexpr

Definition at line 1985 of file ranges.

## ◆ iota

_Iota std::ranges::views::iota
| inlineconstexpr

Definition at line 915 of file ranges.

## ◆ istream

template<typename _Tp>

_Istream<_Tp> std::ranges::views::istream
| inlineconstexpr

Definition at line 1037 of file ranges.

## ◆ join

_Join std::ranges::views::join
| inlineconstexpr

Definition at line 3411 of file ranges.

## ◆ keys

auto std::ranges::views::keys
| inlineconstexpr

Definition at line 4733 of file ranges.

## ◆ lazy_split

_LazySplit std::ranges::views::lazy_split
| inlineconstexpr

Definition at line 3880 of file ranges.

## ◆ reverse

_Reverse std::ranges::views::reverse
| inlineconstexpr

Definition at line 4350 of file ranges.

## ◆ single

_Single std::ranges::views::single
| inlineconstexpr

Definition at line 893 of file ranges.

## ◆ split

_Split std::ranges::views::split
| inlineconstexpr

Definition at line 4078 of file ranges.

## ◆ take

_Take std::ranges::views::take
| inlineconstexpr

Definition at line 2612 of file ranges.

## ◆ take_while

_TakeWhile std::ranges::views::take_while
| inlineconstexpr

Definition at line 2734 of file ranges.

## ◆ transform

_Transform std::ranges::views::transform
| inlineconstexpr

Definition at line 2369 of file ranges.

## ◆ values

auto std::ranges::views::values
| inlineconstexpr

Definition at line 4734 of file ranges.