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 | ) |

inline explicit constexpr noexcept

Definition at line 439 of file ranges.

## single_view() [2/3]

template<copy_constructible _Tp>

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

inline explicit constexpr noexcept

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 )

inline explicit constexpr noexcept

Definition at line 456 of file ranges.

## Member Function Documentation

## back()

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

inline constexpr inherited

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

inline constexpr noexcept

Definition at line 466 of file ranges.

## begin() [2/2]

template<copy_constructible _Tp>

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

inline constexpr noexcept

Definition at line 462 of file ranges.

## cbegin()

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

inline constexpr inherited

Definition at line 204 of file ranges_util.h.

## cend()

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

inline constexpr inherited

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

inline constexpr noexcept

Definition at line 492 of file ranges.

## data() [2/2]

template<copy_constructible _Tp>

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

inline constexpr noexcept

Definition at line 488 of file ranges.

## empty()

template<copy_constructible _Tp>

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

inline static constexpr noexcept

Definition at line 480 of file ranges.

## end() [1/2]

template<copy_constructible _Tp>

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

inline constexpr noexcept

Definition at line 474 of file ranges.

## end() [2/2]

template<copy_constructible _Tp>

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

inline constexpr noexcept

Definition at line 470 of file ranges.

## front()

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

inline constexpr inherited

Definition at line 162 of file ranges_util.h.

## operator bool()

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

inline explicit constexpr noexcept inherited

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 | ) |

inline constexpr inherited

Definition at line 194 of file ranges_util.h.

## size()

template<copy_constructible _Tp>

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

inline static constexpr noexcept

Definition at line 484 of file ranges.

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

- ranges