Horizon
Loading...
Searching...
No Matches
ranges::view_facade< Derived, Cardinality > Struct Template Reference

A utility for constructing a view from a (derived) type that implements begin and end cursors. More...

#include <facade.hpp>

Inheritance diagram for ranges::view_facade< Derived, Cardinality >:
ranges::view_interface< Derived, Cardinality > ranges::basic_view< Cardinality > ranges::view_base ranges::any_view< Ref, Cat, meta::if_c<(Cat &category::forward)==category::input > > ranges::experimental::generator< Reference, Value > ranges::view_adaptor< Derived, BaseRng, Cardinality > ranges::adjacent_filter_view< Rng, logical_negate< equal_to > > ranges::indirect_view< take_while_view< iota_view< iterator_t< CRng > >, search_pred > > ranges::iter_transform_view< Rng, detail::replacer_fn< Val1, Val2 > > ranges::iter_transform_view< Rng, detail::replacer_if_fn< Pred, Val > >

Classes

struct  view_as_cursor

Public Member Functions

 template (typename D=Derived)() const expr auto begin() -> detail::facade_iterator_t< D >
 Let d be static_cast<Derived &>(*this).
 template (typename D=Derived)() const expr auto begin() const -> detail::facade_iterator_t< D const >
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 template (typename D=Derived)() const expr auto end() -> detail::facade_sentinel_t< D >
 Let d be static_cast<Derived &>(*this).
 template (typename D=Derived)() const expr auto end() const -> detail::facade_sentinel_t< D const >
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Public Member Functions inherited from ranges::view_interface< Derived, Cardinality >
 view_interface (view_interface &&)=default
 view_interface (view_interface const &)=default
view_interface & operator= (view_interface &&)=default
view_interface & operator= (view_interface const &)=default
CPP_member constexpr auto empty () const noexcept -> CPP_ret(bool)()
 Test whether a range can be empty:

Protected Member Functions

constexpr view_as_cursor begin_cursor () const
constexpr default_sentinel_t end_cursor () const
Protected Member Functions inherited from ranges::view_interface< Derived, Cardinality >
constexpr Derived & derived () noexcept
constexpr Derived const & derived () const noexcept
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Protected Attributes

friend range_access

Additional Inherited Members

Protected Types inherited from ranges::view_interface< Derived, Cardinality >
template<bool B>
using D = meta::invoke<detail::dependent_<B>, Derived>

Detailed Description

template<typename Derived, cardinality Cardinality>
struct ranges::view_facade< Derived, Cardinality >

A utility for constructing a view from a (derived) type that implements begin and end cursors.

Template Parameters
DerivedA type that derives from view_facade and implements begin and end cursors. This type is permitted to be incomplete.
CardinalityThe cardinality of this view: finite, infinite, or unknown. See ranges::cardinality.

Member Function Documentation

◆ template() [1/2]

template<typename Derived, cardinality Cardinality>
ranges::view_facade< Derived, Cardinality >::template ( typename D = Derived) const->detail::facade_iterator_t< D >
inline

Let d be static_cast<Derived &>(*this).

Let b be std::as_const(d).begin_cursor() if that expression is well-formed; otherwise, let b be d.begin_cursor(). Let B be the type of b.

Returns
ranges::basic_iterator<B>(b)

◆ template() [2/2]

template<typename Derived, cardinality Cardinality>
ranges::view_facade< Derived, Cardinality >::template ( typename D = Derived) const->detail::facade_sentinel_t< D >
inline

Let d be static_cast<Derived &>(*this).

Let e be std::as_const(d).end_cursor() if that expression is well-formed; otherwise, let e be d.end_cursor(). Let E be the type of e.

Returns
ranges::basic_iterator<E>(e) if E is the same as B computed above for begin(); otherwise, return e.

The documentation for this struct was generated from the following files: