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 constructible_from<_Tp, _Args...>
constexpr single_view (in_place_t, _Args &&... __args) noexcept(is_nothrow_constructible_v< _Tp, _Args... >)
 
constexpr decltype(auto) back ()
 
constexpr decltype(auto) back () const
 
constexpr const _Tp * begin () const noexcept
 
constexpr _Tp * begin () noexcept
 
constexpr const _Tp * data () const noexcept
 
constexpr _Tp * data () noexcept
 
constexpr bool empty () const noexcept(noexcept(_S_empty(_M_derived())))
 
constexpr bool empty () noexcept(noexcept(_S_empty(_M_derived())))
 
constexpr const _Tp * end () const noexcept
 
constexpr _Tp * end () noexcept
 
constexpr decltype(auto) front ()
 
constexpr decltype(auto) front () const
 
constexpr operator bool () const noexcept(noexcept(ranges::empty(_M_derived())))
 
constexpr operator bool () noexcept(noexcept(ranges::empty(_M_derived())))
 
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())))
 

Static Public Member Functions

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 235 of file ranges.

Constructor & Destructor Documentation

◆ single_view() [1/3]

template<copy_constructible _Tp>
constexpr std::ranges::single_view< _Tp >::single_view ( const _Tp &  __t)
inlineexplicitconstexprnoexcept

Definition at line 241 of file ranges.

◆ single_view() [2/3]

template<copy_constructible _Tp>
constexpr std::ranges::single_view< _Tp >::single_view ( _Tp &&  __t)
inlineexplicitconstexprnoexcept

Definition at line 247 of file ranges.

◆ single_view() [3/3]

template<copy_constructible _Tp>
template<typename... _Args>
requires constructible_from<_Tp, _Args...>
constexpr std::ranges::single_view< _Tp >::single_view ( in_place_t  ,
_Args &&...  __args 
)
inlineexplicitconstexprnoexcept

Definition at line 257 of file ranges.

Member Function Documentation

◆ back() [1/2]

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

Definition at line 158 of file ranges_util.h.

◆ back() [2/2]

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

Definition at line 166 of file ranges_util.h.

◆ begin() [1/2]

template<copy_constructible _Tp>
constexpr const _Tp * std::ranges::single_view< _Tp >::begin ( ) const
inlineconstexprnoexcept

Definition at line 267 of file ranges.

◆ begin() [2/2]

template<copy_constructible _Tp>
constexpr _Tp * std::ranges::single_view< _Tp >::begin ( )
inlineconstexprnoexcept

Definition at line 263 of file ranges.

◆ data() [1/2]

template<copy_constructible _Tp>
constexpr const _Tp * std::ranges::single_view< _Tp >::data ( ) const
inlineconstexprnoexcept

Definition at line 287 of file ranges.

◆ data() [2/2]

template<copy_constructible _Tp>
constexpr _Tp * std::ranges::single_view< _Tp >::data ( )
inlineconstexprnoexcept

Definition at line 283 of file ranges.

◆ empty() [1/2]

constexpr bool std::ranges::view_interface< single_view< _Tp > >::empty ( ) const
inlineconstexprnoexceptinherited

Definition at line 104 of file ranges_util.h.

◆ empty() [2/2]

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

Definition at line 98 of file ranges_util.h.

◆ end() [1/2]

template<copy_constructible _Tp>
constexpr const _Tp * std::ranges::single_view< _Tp >::end ( ) const
inlineconstexprnoexcept

Definition at line 275 of file ranges.

◆ end() [2/2]

template<copy_constructible _Tp>
constexpr _Tp * std::ranges::single_view< _Tp >::end ( )
inlineconstexprnoexcept

Definition at line 271 of file ranges.

◆ front() [1/2]

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

Definition at line 144 of file ranges_util.h.

◆ front() [2/2]

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

Definition at line 151 of file ranges_util.h.

◆ operator bool() [1/2]

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

Definition at line 115 of file ranges_util.h.

◆ operator bool() [2/2]

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

Definition at line 110 of file ranges_util.h.

◆ operator[]() [1/2]

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

Definition at line 176 of file ranges_util.h.

◆ operator[]() [2/2]

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

Definition at line 181 of file ranges_util.h.

◆ size() [1/2]

constexpr auto std::ranges::view_interface< single_view< _Tp > >::size ( ) const
inlineconstexprnoexceptinherited

Definition at line 137 of file ranges_util.h.

◆ size() [2/2]

template<copy_constructible _Tp>
static constexpr size_t std::ranges::single_view< _Tp >::size ( )
inlinestaticconstexprnoexcept

Definition at line 279 of file ranges.


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