10 #ifndef LARCOREALG_COREUTILS_VALUES_H 11 #define LARCOREALG_COREUTILS_VALUES_H 21 #include <type_traits> 22 #include <unordered_map> 57 template <
typename Coll>
58 decltype(
auto)
values(Coll&& coll);
68 template <typename Coll>
85 template <
typename Coll,
typename =
void>
89 static constexpr decltype(
auto) iterate(T&& coll) noexcept
97 template <
typename Map, std::
size_t NElement = 1U>
100 template <
typename T>
101 static constexpr decltype(
auto) iterate(T&& coll) noexcept
103 return util::get_elements<NElement>(std::forward<T>(coll));
109 template <
typename Key,
typename Value,
typename... Args>
112 template <
typename Key,
typename Value,
typename... Args>
121 template <
typename Coll>
128 template <
typename Coll>
131 return values(std::as_const(coll));
136 #endif // LARCOREALG_COREUTILS_VALUES_H Namespace for general, non-LArSoft-specific utilities.
An object with a begin and end iterator.
Definition of util::get_elements() and util::get_const_elements().
decltype(auto) const_values(Coll &&coll)
Range-for loop helper iterating across the constant values of the specified collection.
decltype(auto) values(Coll &&coll)
Range-for loop helper iterating across the values of the specified collection.