10 #ifndef LARCOREALG_COREUTILS_COUNTER_H 11 #define LARCOREALG_COREUTILS_COUNTER_H 51 template <
typename T = std::
size_t>
145 template <
typename U>
152 template <
typename U>
188 template <
typename T>
193 template <
typename T>
218 template <
typename T = std::
size_t>
243 template <
typename T>
265 template <
typename T>
271 template <
typename T>
277 template <
typename T>
283 template <
typename T>
294 template <
typename T>
301 template <
typename T>
309 #endif // LARCOREALG_COREUTILS_COUNTER_H T value_type
Type of index returned by this iterator.
Namespace for general, non-LArSoft-specific utilities.
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.
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.
span(IterB &&b, IterE &&e, Adaptor &&adaptor) -> span< decltype(adaptor(std::forward< IterB >(b))), decltype(adaptor(std::forward< IterE >(e))) >
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.