libstdc++: std::ranges::single_view< _Tp > Class Template Reference

libstdc++

std::ranges::single_view< _Tp > Class Template Reference

`#include <ranges>`

Inheritance diagram for std::ranges::single_view< _Tp >:
[legend]

## Public Member Functions
constexpr | single_view (_Tp &&__t) noexcept(is_nothrow_move_constructible_v< _Tp >)
constexpr | single_view (const _Tp &__t) noexcept(is_nothrow_copy_constructible_v< _Tp >)
template<typename... _Args> requires constructible_from<_Tp, _Args...>
constexpr | single_view (in_place_t, _Args &&... __args) noexcept(is_nothrow_constructible_v< _Tp, _Args... >)
constexpr decltype(auto) | back ()
constexpr const _Tp * | begin () const noexcept
constexpr _Tp * | begin () noexcept
constexpr auto | cbegin ()
constexpr auto | cend ()
constexpr const _Tp * | data () const noexcept
constexpr _Tp * | data () noexcept
constexpr const _Tp * | end () const noexcept
constexpr _Tp * | end () noexcept
constexpr decltype(auto) | front ()
constexpr | operator bool () noexcept(noexcept(ranges::empty(_M_derived())))
constexpr decltype(auto) | operator[] (range_difference_t< _Range > __n)

## Static Public Member Functions
static constexpr bool | empty () noexcept
static constexpr size_t | size () noexcept

## Detailed Description

template<copy_constructible _Tp>
requires is_object_v<_Tp>
class std::ranges::single_view< _Tp >

A view that contains exactly one element.

Definition at line 433 of file ranges.

## Constructor & Destructor Documentation

## ◆ single_view() [1/3]

template<copy_constructible _Tp>

std::ranges::single_view< _Tp >::single_view | ( | const _Tp & | __t | ) |
| inlineexplicitconstexprnoexcept

Definition at line 439 of file ranges.

## ◆ single_view() [2/3]

template<copy_constructible _Tp>

std::ranges::single_view< _Tp >::single_view | ( | _Tp && | __t | ) |
| inlineexplicitconstexprnoexcept

Definition at line 446 of file ranges.

## ◆ single_view() [3/3]

template<copy_constructible _Tp>
template<typename... _Args>
requires constructible_from<_Tp, _Args...>

std::ranges::single_view< _Tp >::single_view | ( | in_place_t | ,
|  | _Args &&... | __args )
| inlineexplicitconstexprnoexcept

Definition at line 456 of file ranges.

## Member Function Documentation

## ◆ back()

decltype(auto) std::ranges::view_interface< single_view< _Tp > >::back | ( |  | ) |
| inlineconstexprinherited

Definition at line 176 of file ranges_util.h.

## ◆ begin() [1/2]

template<copy_constructible _Tp>

const _Tp * std::ranges::single_view< _Tp >::begin | ( |  | ) | const
| inlineconstexprnoexcept

Definition at line 466 of file ranges.

## ◆ begin() [2/2]

template<copy_constructible _Tp>

_Tp * std::ranges::single_view< _Tp >::begin | ( |  | ) |
| inlineconstexprnoexcept

Definition at line 462 of file ranges.

## ◆ cbegin()

auto std::ranges::view_interface< single_view< _Tp > >::cbegin | ( |  | ) |
| inlineconstexprinherited

Definition at line 204 of file ranges_util.h.

## ◆ cend()

auto std::ranges::view_interface< single_view< _Tp > >::cend | ( |  | ) |
| inlineconstexprinherited

Definition at line 212 of file ranges_util.h.

## ◆ data() [1/2]

template<copy_constructible _Tp>

const _Tp * std::ranges::single_view< _Tp >::data | ( |  | ) | const
| inlineconstexprnoexcept

Definition at line 492 of file ranges.

## ◆ data() [2/2]

template<copy_constructible _Tp>

_Tp * std::ranges::single_view< _Tp >::data | ( |  | ) |
| inlineconstexprnoexcept

Definition at line 488 of file ranges.

## ◆ empty()

template<copy_constructible _Tp>

constexpr bool std::ranges::single_view< _Tp >::empty | ( |  | ) |
| inlinestaticconstexprnoexcept

Definition at line 480 of file ranges.

## ◆ end() [1/2]

template<copy_constructible _Tp>

const _Tp * std::ranges::single_view< _Tp >::end | ( |  | ) | const
| inlineconstexprnoexcept

Definition at line 474 of file ranges.

## ◆ end() [2/2]

template<copy_constructible _Tp>

_Tp * std::ranges::single_view< _Tp >::end | ( |  | ) |
| inlineconstexprnoexcept

Definition at line 470 of file ranges.

## ◆ front()

decltype(auto) std::ranges::view_interface< single_view< _Tp > >::front | ( |  | ) |
| inlineconstexprinherited

Definition at line 162 of file ranges_util.h.

## ◆ operator bool()

std::ranges::view_interface< single_view< _Tp > >::operator bool | ( |  | ) |
| inlineexplicitconstexprnoexceptinherited

Definition at line 128 of file ranges_util.h.

## ◆ operator[]()

decltype(auto) std::ranges::view_interface< single_view< _Tp > >::operator[] | ( | range_difference_t< _Range > | __n | ) |
| inlineconstexprinherited

Definition at line 194 of file ranges_util.h.

## ◆ size()

template<copy_constructible _Tp>

constexpr size_t std::ranges::single_view< _Tp >::size | ( |  | ) |
| inlinestaticconstexprnoexcept

Definition at line 484 of file ranges.

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

- ranges