|
template<typename deduced_value_t>
requires (!std::same_as<deduced_value_t, single>) |
| constexpr | single (const deduced_value_t &value) |
| | Construct the view by copying a value.
|
template<typename deduced_value_t>
requires (!std::same_as<deduced_value_t, single>) |
| constexpr | single (deduced_value_t &&value) |
| | Construct the view by moving a value.
|
| template<class... Args> |
| constexpr | single (std::in_place_t, Args &&... args) |
| | Construct the stored value in place.
|
|
constexpr | single_view ()=default |
| | Default constructor.
|
| constexpr | single_view (const value_t &value) |
| | Construct the view by copying its single element.
|
| template<class... Args> |
| constexpr | single_view (std::in_place_t, Args &&... args) |
| | Construct value in place from args.
|
| constexpr | single_view (value_t &&value) |
| | Construct the view by moving in its single element.
|
| 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[] (const dindex) const -> value_t |
| constexpr auto | ref () -> value_t & |
| | Return a mutable reference to the stored element.
|
| constexpr auto | ref () const -> const value_t & |
| | Return a const reference to the stored element.
|
| constexpr auto | value () const -> value_t |
| | Return the single stored value by value.
|
| 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>
struct detray::ranges::views::single< value_t >
interface type to construct a single_view with CTAD