A utility for constructing a view from a (derived) type that implements begin and end cursors.
More...
#include <facade.hpp>
|
| template (typename D=Derived)(requires same_as< D |
| Let d be static_cast<Derived &>(*this) . More...
|
|
constexpr Derived auto | begin () -> detail::facade_iterator_t< D > |
|
| template (typename D=Derived)(requires same_as< D |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
|
constexpr Derived auto | begin () const -> detail::facade_iterator_t< D const > |
|
| template (typename D=Derived)(requires same_as< D |
| Let d be static_cast<Derived &>(*this) . More...
|
|
constexpr Derived auto | end () -> detail::facade_sentinel_t< D > |
|
| template (typename D=Derived)(requires same_as< D |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
|
constexpr Derived auto | end () const -> detail::facade_sentinel_t< D const > |
|
| view_interface (view_interface &&)=default |
|
| view_interface (view_interface const &)=default |
|
view_interface & | operator= (view_interface &&)=default |
|
view_interface & | operator= (view_interface const &)=default |
|
constexpr CPP_member auto | empty () const noexcept -> CPP_ret(bool)(requires(detail::has_fixed_size_< Cardinality >)) |
| Test whether a range can be empty:
|
|
|
constexpr view_as_cursor | begin_cursor () const |
|
constexpr default_sentinel_t | end_cursor () const |
|
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.
|
|
|
template<bool B> |
using | D = meta::invoke< detail::dependent_< B >, Derived > |
|
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
-
Derived | A type that derives from view_facade and implements begin and end cursors. This type is permitted to be incomplete. |
Cardinality | The cardinality of this view: finite , infinite , or unknown . See ranges::cardinality . |
◆ template() [1/2]
template<typename Derived , cardinality Cardinality>
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>
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: