10 #ifndef LARCOREALG_COREUTILS_COUNTER_H
11 #define LARCOREALG_COREUTILS_COUNTER_H
53 template <
typename T = std::
size_t>
136 template <
typename U>
141 template <
typename U>
178 template <
typename T>
183 template <
typename T>
205 template <
typename T = std::
size_t>
222 namespace util::details {
233 template <
typename T>
257 template <
typename T>
262 template <
typename T>
267 template <
typename T>
272 template <
typename T>
284 template <
typename T>
290 template <
typename T>
301 #endif // LARCOREALG_COREUTILS_COUNTER_H
T value_type
Type of index returned by this iterator.
An object with a begin and end iterator.
An iterator dereferencing to a counter value.
auto infinite_counter(T begin=T{})
Version of util::counter() starting at begin and never ending.
Simple class with a begin and an end.
std::ptrdiff_t difference_type
decltype(auto) constexpr end(T &&obj)
ADL-aware version of std::end.
std::ptrdiff_t difference_type
auto counter(T begin, T end)
Returns an object to iterate values from begin to end in a range-for loop.
Class used as end iterator (sentinel) for an infinite loop.
T const & reference
Type returned by dereference operator.
auto end(FixedBins< T, C > const &) noexcept
bool operator!=(this_iterator_t const &) const
Never admit this iterator is equal to anything else (except the same).
bool operator==(this_iterator_t const &) const
Never admit this iterator is equal to anything else (except the same).
count_iterator(value_type count)
Initializes the iterator with the specified loop count.
auto begin(FixedBins< T, C > const &) noexcept
reference operator*() const
Returns the current loop count.
value_type fCount
Internal counter.
iterator_type & operator++()
Increments the loop count of this iterator, which is then returned.
decltype(auto) constexpr begin(T &&obj)
ADL-aware version of std::begin.
std::size_t count(Cont const &cont)
iterator_type & operator--()
Decrements the loop count of this iterator, which is then returned.
std::forward_iterator_tag iterator_category
bool operator!=(count_iterator< U > const &other) const
Iterators are equal if their loop counts compare different.
count_iterator()=default
Initializes the iterator.
bool operator==(count_iterator< U > const &other) const
Iterators are equal if their loop counts compare equal.
std::bidirectional_iterator_tag iterator_category