|
|
constexpr | static_join_view ()=default |
| | Default constructor.
|
| template<detray::ranges::range... ranges_t> |
| constexpr | static_join_view (const ranges_t &...ranges) |
| | Construct from a pack of ranges - const.
|
template<detray::ranges::range... ranges_t>
requires ((sizeof...(ranges_t) > 1) || ((!std::same_as<static_join_view, ranges_t>) && ...)) |
| constexpr | static_join_view (ranges_t &&...ranges) |
| | Construct from a pack of ranges.
|
| constexpr auto | begin () const -> iterator_t |
| constexpr auto | data () -> value_t * |
| constexpr auto | data () const -> const value_t * |
| constexpr auto | end () const -> iterator_t |
| constexpr auto | size () const noexcept -> std::size_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<std::size_t I, std::input_iterator range_itr_t>
struct detray::ranges::static_join_view< I, range_itr_t >
Range adaptor that joins different ranges of the same type (static).
- See also
- https://en.cppreference.com/w/cpp/ranges/join_view
- Template Parameters
-
| I | the number of ranges in the join. |
| range_itr_t | the iterator type of the ranges. |
- Note
- Static implementation: The number of ranges needs to be know at compile time
-
Does not take ownership of the ranges it operates on. Their lifetime needs to be guaranteed throughout iteration or between iterations with the same join instance.
-
Is not fit for lazy evaluation.
- Todo
- improve performance of e.g.
operator+ and operator+=