Range-v3
Range algorithms, views, and actions for the Standard Library
ranges::v3::bounded_view< Rng > Struct Template Reference
+ Inheritance diagram for ranges::v3::bounded_view< Rng >:

Public Member Functions

Rng & base ()
 
Rng const & base () const
 
detail::bounded_iterator_t< Rng > begin ()
 
template<typename R = Rng const, requires = (View<R>())>
detail::bounded_iterator_t< R > begin () const
 
 bounded_view (Rng rng)
 
detail::bounded_iterator_t< Rng > end ()
 
template<typename R = Rng const, requires = (View<R>())>
detail::bounded_iterator_t< R > end () const
 
range_size_t< Rng > size ()
 
range_size_t< Rng > size () const
 
- Public Member Functions inherited from ranges::v3::view_interface< bounded_view< Rng >, range_cardinality< Rng >::value >
range_reference_t< D > back ()
 Access the last element in a range:
 
range_reference_t< D const > back () const
 
constexpr bool empty () const
 
range_reference_t< D > front ()
 Access the first element in a range:
 
range_reference_t< D const > front () const
 
constexpr operator bool () const
 
 operator Container ()
 Implicit conversion to something that looks like a container.
 
 operator Container () const
 
constexpr bool operator! () const
 
view_interfaceoperator= (view_interface &&)=default
 
view_interfaceoperator= (view_interface const &)=default
 
auto operator[] (range_difference_t< D > n) -> decltype(std::declval< D & >().begin()[n])
 Simple indexing:
 
auto operator[] (range_difference_t< D > n) const -> decltype(std::declval< D const & >().begin()[n])
 
auto operator[] (detail::slice_bounds< range_difference_t< D >> offs) -> decltype(std::declval< Slice >()(std::declval< D & >(), offs.from, offs.to))
 Python-ic slicing:
 
auto operator[] (detail::slice_bounds< range_difference_t< D >> offs) const -> decltype(std::declval< Slice >()(std::declval< D const & >(), offs.from, offs.to))
 
auto operator[] (detail::slice_bounds< range_difference_t< D >, detail::from_end_< range_difference_t< D >>> offs) -> decltype(std::declval< Slice >()(std::declval< D & >(), offs.from, offs.to))
 
auto operator[] (detail::slice_bounds< range_difference_t< D >, detail::from_end_< range_difference_t< D >>> offs) const -> decltype(std::declval< Slice >()(std::declval< D const & >(), offs.from, offs.to))
 
auto operator[] (detail::slice_bounds< detail::from_end_< range_difference_t< D >>, detail::from_end_< range_difference_t< D >>> offs) -> decltype(std::declval< Slice >()(std::declval< D & >(), offs.from, offs.to))
 
auto operator[] (detail::slice_bounds< detail::from_end_< range_difference_t< D >>, detail::from_end_< range_difference_t< D >>> offs) const -> decltype(std::declval< Slice >()(std::declval< D const & >(), offs.from, offs.to))
 
auto operator[] (detail::slice_bounds< range_difference_t< D >, end_fn > offs) -> decltype(std::declval< Slice >()(std::declval< D & >(), offs.from, offs.to))
 
auto operator[] (detail::slice_bounds< range_difference_t< D >, end_fn > offs) const -> decltype(std::declval< Slice >()(std::declval< D const & >(), offs.from, offs.to))
 
auto operator[] (detail::slice_bounds< detail::from_end_< range_difference_t< D >>, end_fn > offs) -> decltype(std::declval< Slice >()(std::declval< D & >(), offs.from, offs.to))
 
auto operator[] (detail::slice_bounds< detail::from_end_< range_difference_t< D >>, end_fn > offs) const -> decltype(std::declval< Slice >()(std::declval< D const & >(), offs.from, offs.to))
 
constexpr range_size_t< D > size () const
 Access the size of the range, if it can be determined:
 
constexpr range_size_t< D > size () const
 
 view_interface (view_interface &&)=default
 
 view_interface (view_interface const &)=default
 

Additional Inherited Members

- Protected Member Functions inherited from ranges::v3::view_interface< bounded_view< Rng >, range_cardinality< Rng >::value >
bounded_view< Rng > & derived ()
 
bounded_view< Rng > const & derived () const
 

Member Function Documentation

template<typename Rng >
range_size_t<Rng> ranges::v3::bounded_view< Rng >::size ( )
Precondition
SizedRange<Rng>()
template<typename Rng >
range_size_t<Rng> ranges::v3::bounded_view< Rng >::size ( ) const
Precondition
SizedRange<Rng const>()