21 template<
class... args_t>
22 using function_type = std::function<args_t...>;
41 template<
class T,
class traits_t = default_
generic_span_traits>
44 template<
class container_t>
45 using container_value = std::remove_reference_t<decltype(*std::declval<container_t>().
begin())>;
47 template<
class target_t>
48 using qualified_type = copy_qualifiers_t<std::remove_reference_t<std::remove_pointer_t<T>>, target_t>;
51 using traits = traits_t;
52 template<
class... args_t>
53 using function_type =
typename traits_t::template function_type<args_t...>;
54 using generator_type = function_type<T*()>;
56 using element_type = T;
57 using value_type = std::remove_cv_t<T>;
67 using difference_type = std::ptrdiff_t;
68 using size_type = size_t;
69 using iterator_category = std::forward_iterator_tag;
70 using iterator_concept = std::forward_iterator_tag;
75 iterator(generator_type generator, size_type nIndex) noexcept;
76 [[nodiscard]] reference operator*()
const noexcept;
77 [[nodiscard]] pointer operator->()
const noexcept;
79 [[nodiscard]]
iterator operator++(
int) noexcept;
80 bool operator!=(
const iterator& r)
const noexcept;
81 bool operator==(
const iterator& r)
const noexcept;
82 operator void*()
const noexcept;
83 operator bool()
const noexcept;
86 generator_type m_Generator;
87 size_type m_nIndex = 0;
100 template<class container_t>
109 template<class container_t>
111 container_t& container,
112 function_type<reference(qualified_type<container_value<container_t>>&)> valueAdapter) noexcept;
120 template<class container_t>
130 bool empty() const noexcept;
165 template<class container_t, class adapter_t>
166 static generator_type create_initial_generator(container_t&& container, adapter_t adapter) noexcept;
169 generator_type m_InitialGenerator;
174 #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.