10 #ifndef LARCOREALG_COREUTILS_COUNTER_H 11 #define LARCOREALG_COREUTILS_COUNTER_H 14 #include "range/v3/view.hpp" 51 template <
typename T = std::
size_t>
144 template <
typename U>
151 template <
typename U>
187 template <
typename T>
192 template <
typename T>
217 template <
typename T = std::
size_t>
242 template <
typename T>
264 template <
typename T>
270 template <
typename T>
276 template <
typename T>
282 template <
typename T>
291 template <
typename T>
298 template <
typename T>
306 #endif // LARCOREALG_COREUTILS_COUNTER_H T value_type
Type of index returned by this iterator.
Namespace for general, non-LArSoft-specific utilities.
An iterator dereferencing to a counter value.
auto infinite_counter(T begin=T{})
Version of util::counter() starting at begin and never ending.
std::ptrdiff_t difference_type
decltype(auto) constexpr end(T &&obj)
ADL-aware version of std::end.
std::ptrdiff_t difference_type
Type of this iterator.
iterator_type operator--(int) const
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.
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.
reference operator*() const
Returns the current loop count.
T * pointer
Type of this iterator.
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.
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.
iterator_type operator++(int) const
bool operator==(count_iterator< U > const &other) const
Iterators are equal if their loop counts compare equal.
std::bidirectional_iterator_tag iterator_category
Type of this iterator.