20 template<
class... args_t>
21 using function_type = std::function<args_t...>;
40 template<
class T,
class traits_t = default_
generic_span_traits>
43 template<
class container_t>
44 using container_value = std::remove_reference_t<decltype(*std::declval<container_t>().
begin())>;
46 template<
class target_t>
47 using qualified_type = copy_qualifiers_t<std::remove_reference_t<std::remove_pointer_t<T>>, target_t>;
50 using traits = traits_t;
51 template<
class... args_t>
52 using function_type =
typename traits_t::template function_type<args_t...>;
53 using generator_type = function_type<T*()>;
55 using element_type = T;
56 using value_type = std::remove_cv_t<T>;
66 using difference_type = std::ptrdiff_t;
67 using size_type = size_t;
68 using iterator_category = std::forward_iterator_tag;
69 using iterator_concept = std::forward_iterator_tag;
72 constexpr
iterator() noexcept =
default;
74 constexpr
iterator(generator_type generator, size_type nIndex) noexcept;
75 [[nodiscard]] constexpr reference operator*()
const noexcept;
76 [[nodiscard]] constexpr pointer operator->()
const noexcept;
77 constexpr
iterator& operator++() noexcept;
78 [[nodiscard]] constexpr
iterator operator++(
int) noexcept;
79 constexpr
bool operator!=(
const iterator& r)
const noexcept;
80 constexpr
bool operator==(
const iterator& r)
const noexcept;
81 constexpr
operator void*()
const noexcept;
84 generator_type m_Generator;
85 size_type m_nIndex = 0;
98 template<class container_t>
107 template<class container_t>
109 container_t& container,
110 function_type<reference(qualified_type<container_value<container_t>>&)> valueAdapter) noexcept;
118 template<class container_t>
128 bool empty() const noexcept;
163 template<class container_t, class adapter_t>
164 static generator_type create_initial_generator(container_t&& container, adapter_t adapter) noexcept;
167 generator_type m_InitialGenerator;
172 #include <qx/patterns/generic_span.inl>
Same as std::span, but may be used with any container with forward iterators.
iterator begin() const noexcept
Return iterator to beginning.