11#include "util/Constraints.h"
27 static constexpr SortOrder ASCENDING = SortOrder::ASCENDING;
29 static constexpr SortOrder DESCENDING = SortOrder::DESCENDING;
53 #define CXXITER_CHAINER_NODISCARD_WARNING "The result of chainer methods needs to be used, otherwise the iterator will not be doing any work."
55 template<
size_t START,
size_t END,
typename F>
56 constexpr bool constexpr_for(F&& f) {
57 if constexpr (START < END) {
58 if(f(std::integral_constant<size_t, START>()) ==
false) {
return false; }
59 if(constexpr_for<START + 1, END>(f) ==
false) {
return false; }
64 template<
typename TConstSrc,
typename TOut>
65 using copy_const_from = std::conditional_t<
66 std::is_const_v<std::remove_reference_t<TConstSrc>>,
67 std::add_const_t<TOut>,
68 std::remove_const_t<TOut>
73 concept CXXIterIterator =
74 (std::is_same_v<typename trait::Iterator<T>::Self, T>) &&
94 concept CXXIterContiguousMemoryIterator = CXXIterExactSizeIterator<T>
100 template<CXXIterIterator TSelf>
class IterApi;
SortOrder
SortOrder for the item sorting methods.
StatisticNormalization
Normalization variant to use while calculating statistics (mean / stddev / ...)
@ N
Use when the mean, variance, stddev is calculated with the COMPLETE population.
@ N_MINUS_ONE
Use when the mean, variance, stddev is calculated from a sample of the population.
static constexpr ItemPtr currentPtr(typename trait::Iterator< T >::Self &self)=delete
Get the pointer of the current element.
std::add_pointer_t< std::remove_reference_t< typename Iterator< T >::Item > > ItemPtr
Pointer type to an item of this iterator.
static constexpr IterValue< typename Iterator< T >::Item > nextBack(Self &self)=delete
Pull the next last element from the iterator pipeline previous to this pipeline-element.
static constexpr size_t size(const typename trait::Iterator< T >::Self &self)=delete
Get the iterator's exact number of elements.
static constexpr IterValue< Item > next(Self &self)=delete
Pull one element from the iterator pipeline previous to this pipeline-element.
void Item
Item-Type. This is the type of elements that can be pulled from this pipeline-element.
trait::Iterator< T > Self
Self-Type. This is the type of the struct for which the trait::Iterator is being specialized.
static constexpr SizeHint sizeHint(const Self &self)=delete
Get the bounds on the remaining length of the iterator pipeline until this pipeline-element,...
static constexpr size_t advanceBy(Self &self, size_t n)=delete
Advance the iterator by n elements.