VCCC  2024.05
VisualCamp Common C++ library
ref_view< R > Class Template Reference

#include </home/jarvis/actions-runner/jarvis-vccc-2/_work/vccc/vccc/include/vccc/__ranges/ref_view.hpp>

+ Inheritance diagram for ref_view< R >:

Detailed Description

template<typename R>
class vccc::ranges::ref_view< R >

ref_view is a view of the elements of some other range. It wraps a reference to that range.

Public Member Functions

template<typename T , std::enable_if_t< conjunction< different_from< T, ref_view >, convertible_to< T, R & >, std::is_lvalue_reference< T && > >::value, int > = 0>
VCCC_ADDRESSOF_CONSTEXPR ref_view (T &&t) noexcept
 
constexpr R & base () const
 
constexpr iterator_t< R > begin () const
 
constexpr sentinel_t< R > end () const
 
template<typename T = R, std::enable_if_t< is_invocable< decltype(ranges::empty), T & >::value, int > = 0>
constexpr bool empty () const
 
template<typename T = R, std::enable_if_t< sized_range< T >::value, int > = 0>
constexpr auto size () const
 
template<typename T = R, std::enable_if_t< contiguous_range< T >::value, int > = 0>
constexpr auto data () const
 
- Public Member Functions inherited from view_interface< ref_view< R > >
constexpr bool empty ()
 
constexpr bool empty ()
 
constexpr bool empty () const
 
constexpr bool empty () const
 
constexpr auto cbegin ()
 
constexpr auto cbegin () const
 
constexpr auto cend ()
 
constexpr auto cend () const
 
constexpr operator bool ()
 
constexpr operator bool () const
 
constexpr auto data ()
 
constexpr auto data () const
 
constexpr auto size ()
 
constexpr auto size () const
 
constexpr decltype(auto) front ()
 
constexpr decltype(auto) front () const
 
constexpr decltype(auto) back ()
 
constexpr decltype(auto) back () const
 
constexpr decltype(auto) operator[] (range_difference_t< R > n)
 
constexpr decltype(auto) operator[] (range_difference_t< R > n) const
 

Additional Inherited Members

- Public Types inherited from view_interface< ref_view< R > >
using $vccc_derived = ref_view< R >
 

Constructor & Destructor Documentation

◆ ref_view()

VCCC_ADDRESSOF_CONSTEXPR ref_view ( T &&  t)
inlinenoexcept

Member Function Documentation

◆ base()

constexpr R& base ( ) const
inlineconstexpr

◆ begin()

constexpr iterator_t<R> begin ( ) const
inlineconstexpr

◆ data()

constexpr auto data ( ) const
inlineconstexpr

◆ empty()

constexpr bool empty ( ) const
inlineconstexpr

◆ end()

constexpr sentinel_t<R> end ( ) const
inlineconstexpr

◆ size()

constexpr auto size ( ) const
inlineconstexpr

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