Range adaptor that joins different ranges of the same type (static).
More...
#include <detray/utils/ranges/join.hpp>
|
|
using | inner_iterator_t = detray::ranges::iterator_t<outer_value_t> |
| | Iterator over a single range.
|
|
using | iterator_t = detray::ranges::detail::join_iterator<range_t> |
| | Iterator that walks across all nested ranges.
|
|
using | outer_iterator_t = detray::ranges::iterator_t<range_t> |
| | Iterator over the range of ranges.
|
| using | outer_value_t |
| | Type of a single range.
|
|
using | value_t = std::iter_value_t<iterator_t> |
| | Element value type yielded by the joined view.
|
|
|
constexpr | join_view ()=default |
| | Default constructor.
|
template<detray::ranges::range R>
requires (!std::same_as<R, join_view>) |
| constexpr | join_view (R &&ranges) |
| | Construct from a range 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.
|
Range adaptor that joins different ranges of the same type (static).
- See also
- https://en.cppreference.com/w/cpp/ranges/join_view
- Template Parameters
-
| range_t | a range of the ranges that should be joined. |
- 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.
◆ outer_value_t
Initial value:
std::conditional_t<std::is_const_v<range_t>,
const detray::ranges::range_value_t<range_t>,
detray::ranges::range_value_t<range_t>>
Type of a single range.
◆ join_view()
Construct from a range of ranges.
- Parameters
-
| ranges | outer range containing the nested ranges |
◆ begin()
- Returns
- start position of range - const
◆ data() [1/2]
- Returns
- a pointer to the beginning of the data of the first underlying range - non-const
◆ data() [2/2]
- Returns
- a pointer to the beginning of the data of the first underlying range - const
◆ end()
- Returns
- sentinel of the range.
◆ size()
- Returns
- sum of the number elements of all ranges in the join
◆ m_begin
Start and end position of the subranges.
Begin iterator of the outer range.