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>
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.
span(IterB &&b, IterE &&e, Adaptor &&adaptor) -> span< decltype(adaptor(std::forward< IterB >(b))), decltype(adaptor(std::forward< IterE >(e))) >
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
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.
count_iterator(value_type count)
Initializes the iterator with the specified loop count.
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.
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