A view representing a slice of a collection.
More...
#include <slice.hpp>
|
|
template<bool Enable = true, std::enable_if_t< Enable and stdex::default_initializable< V > and stdex::default_initializable< Offset > and stdex::default_initializable< Extent >, int > = 0> |
| constexpr | slice_view () |
| | Default constructor.
|
| |
|
constexpr | slice_view (V &&v, Offset offset={}, Extent extent={}) |
| | Construct from a collection.
|
| |
|
constexpr V & | base () & |
| | The base view.
|
| |
|
constexpr const V & | base () const & |
| |
|
constexpr V && | base () &&noexcept |
| |
|
constexpr const V && | base () const &&noexcept |
| |
| template<bool Enable = true, std::enable_if_t< Enable and stdex::ranges::range< const V >, int > = 0> |
| constexpr auto | begin () & |
| |
|
template<bool Enable = true, std::enable_if_t< Enable and stdex::ranges::range< const V >, int > = 0> |
| constexpr auto | begin () const & |
| |
|
template<bool Enable = true, std::enable_if_t< Enable and stdex::ranges::range< const V >, int > = 0> |
| constexpr auto | begin () &&noexcept |
| |
|
template<bool Enable = true, std::enable_if_t< Enable and stdex::ranges::range< const V >, int > = 0> |
| constexpr auto | begin () const &&noexcept |
| |
| template<bool Enable = true, std::enable_if_t< Enable and stdex::ranges::range< const V >, int > = 0> |
| constexpr auto | end () & |
| |
|
template<bool Enable = true, std::enable_if_t< Enable and stdex::ranges::range< const V >, int > = 0> |
| constexpr auto | end () const & |
| |
|
template<bool Enable = true, std::enable_if_t< Enable and stdex::ranges::range< const V >, int > = 0> |
| constexpr auto | end () &&noexcept |
| |
|
template<bool Enable = true, std::enable_if_t< Enable and stdex::ranges::range< const V >, int > = 0> |
| constexpr auto | end () const &&noexcept |
| |
| template<bool Enable = true, std::enable_if_t< values::index< Extent > or sized< V >, int > = 0> |
| constexpr auto | size () const noexcept |
| |
|
template<std::size_t i> |
| decltype(auto) constexpr | get () & |
| | Get element i.
|
| |
|
template<std::size_t i> |
| decltype(auto) constexpr | get () const & |
| |
|
template<std::size_t i> |
| decltype(auto) constexpr | get () &&noexcept |
| |
|
template<std::size_t i> |
| decltype(auto) constexpr | get () const &&noexcept |
| |
|
constexpr bool | empty () |
| |
|
constexpr bool | empty () const |
| |
|
constexpr auto | cbegin () |
| |
|
constexpr auto | cbegin () const |
| |
|
constexpr auto | cend () |
| |
|
constexpr auto | cend () const |
| |
|
constexpr | operator bool () |
| |
|
constexpr | operator bool () const |
| |
|
constexpr auto | size () |
| |
|
constexpr auto | size () const |
| |
|
decltype(auto) constexpr | front () |
| |
|
decltype(auto) constexpr | front () const |
| |
|
decltype(auto) constexpr | back () |
| |
|
decltype(auto) constexpr | back () const |
| |
|
decltype(auto) constexpr | operator[] (range_difference_t< D > n) |
| |
|
decltype(auto) constexpr | operator[] (range_difference_t< D > n) const |
| |
template<typename V, typename Offset, typename Extent = values::unbounded_size_t>
struct OpenKalman::collections::slice_view< V, Offset, Extent >
A view representing a slice of a collection.
- Template Parameters
-
| Offset | The offset to the beginning of the slice |
| Extent | The size of the slice. If this is omitted or values::unbounded_size_t, The slice will run to the end of the collection (if it is bounded). |
- See also
- views::slice
◆ begin()
template<typename V , typename Offset , typename Extent = values::unbounded_size_t>
template<bool Enable = true, std::enable_if_t< Enable and stdex::ranges::range< const V >, int > = 0>
- Returns
- An iterator at the beginning, if the base object is a range.
◆ end()
template<typename V , typename Offset , typename Extent = values::unbounded_size_t>
template<bool Enable = true, std::enable_if_t< Enable and stdex::ranges::range< const V >, int > = 0>
- Returns
- An iterator at the end, if the base object is a range.
◆ size()
template<typename V , typename Offset , typename Extent = values::unbounded_size_t>
template<bool Enable = true, std::enable_if_t< values::index< Extent > or sized< V >, int > = 0>
- Returns
- The size of the object.
The documentation for this struct was generated from the following file: