|
|
| pointer_view ()=default |
| | Default constructor.
|
| constexpr | pointer_view (value_t &value) |
| | Construct iterator from the single.
|
| constexpr auto | back () noexcept -> value_t |
| constexpr auto | begin () const noexcept -> const value_t * |
| constexpr auto | begin () noexcept -> value_t * |
| constexpr auto | data () const noexcept -> const value_t * |
| constexpr auto | data () noexcept -> value_t * |
| constexpr auto | end () const noexcept -> const value_t * |
| constexpr auto | end () noexcept -> value_t * |
| constexpr auto | front () noexcept -> value_t |
| constexpr auto | operator* () -> value_t & |
| constexpr auto | operator* () const -> const value_t & |
| constexpr auto | operator[] (const dindex) const -> value_t |
| constexpr decltype(auto) | back () const |
| | Return a reference to the last element.
|
| constexpr auto | data () const |
| | Return a pointer to the first element, or null for an empty view.
|
| constexpr auto | empty () const -> bool |
| | Check whether the view contains no elements.
|
| constexpr decltype(auto) | front () const |
| | Return a reference to the first element.
|
| constexpr | operator bool () const |
| | Test whether the view contains at least one element.
|
| constexpr decltype(auto) | operator[] (const dindex i) const |
| | Subscript operator that takes detray dindex.
|
| constexpr auto | size () const |
| | Return the number of elements in the view.
|
template<typename value_t>
class detray::ranges::pointer_view< value_t >
Struct that implements a pointer based view on a single element.
- Template Parameters
-
| value_t | type of the single element (outside of a container) |
- Note
- Does not take ownership of the value it operates on. Its lifetime needs to be guaranteed throughout iteration or between iterations with the same view instance.
-
Is not fit for lazy evaluation.