libstdc++
std::ranges::single_view< _Tp > Class Template Reference
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 constexpr constructible_from< _Tp, _Args... > single_view (in_place_t, _Args &&... __args) noexcept(is_nothrow_constructible_v< _Tp, _Args... >)
 
constexpr decltype(auto) back () const requires bidirectional_range< const single_view< _Tp > > &&common_range< const single_view< _Tp > >
 
constexpr decltype(auto) back () requires bidirectional_range< single_view< _Tp > > &&common_range< single_view< _Tp > >
 
constexpr const _Tp * begin () const noexcept
 
constexpr _Tp * begin () noexcept
 
constexpr const _Tp * data () const noexcept
 
constexpr auto data () const noexcept(noexcept(ranges::begin(_M_derived()))) requires range< const single_view< _Tp > > &&contiguous_iterator< iterator_t< const single_view< _Tp > >>
 
constexpr _Tp * data () noexcept
 
constexpr bool empty () const noexcept(noexcept(_S_empty(_M_derived()))) requires forward_range< const single_view< _Tp > >
 
constexpr bool empty () noexcept(noexcept(_S_empty(_M_derived()))) requires forward_range< single_view< _Tp > >
 
constexpr const _Tp * end () const noexcept
 
constexpr _Tp * end () noexcept
 
constexpr decltype(auto) front () const requires forward_range< const single_view< _Tp > >
 
constexpr decltype(auto) front () requires forward_range< single_view< _Tp > >
 
constexpr operator bool () const noexcept(noexcept(ranges::empty(_M_derived()))) requires requires
 
constexpr operator bool () noexcept(noexcept(ranges::empty(_M_derived()))) requires requires
 
constexpr decltype(auto) operator[] (range_difference_t< _Range > __n)
 
constexpr decltype(auto) operator[] (range_difference_t< _Range > __n) const
 
constexpr auto size () const noexcept(noexcept(_S_size(_M_derived()))) requires forward_range< const single_view< _Tp > > &&sized_sentinel_for< sentinel_t< const single_view< _Tp > >
 
constexpr auto size () noexcept(noexcept(_S_size(_M_derived()))) requires forward_range< single_view< _Tp > > &&sized_sentinel_for< sentinel_t< single_view< _Tp > >
 

Static Public Member Functions

static constexpr size_t size () noexcept
 

Public Attributes

constexpr auto iterator_t< _Derived >
 
constexpr auto iterator_t< const _Derived >
 

Detailed Description

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

A view that contains exactly one element.

Definition at line 235 of file ranges.


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