10 #ifndef LARCOREALG_COREUTILS_VALUES_H
11 #define LARCOREALG_COREUTILS_VALUES_H
20 #include <unordered_map>
23 #include <type_traits>
60 template <
typename Coll>
61 decltype(
auto)
values(Coll&& coll);
71 template <typename Coll>
88 namespace util::details {
91 template <
typename Coll,
typename =
void>
95 static constexpr decltype(
auto) iterate(T&& coll) noexcept
102 template <
typename Map, std::
size_t NElement = 1U>
105 template <
typename T>
106 static constexpr decltype(
auto) iterate(T&& coll) noexcept
107 {
return util::get_elements<NElement>(std::forward<T>(coll)); }
113 template <
typename Key,
typename Value,
typename... Args>
117 template <
typename Key,
typename Value,
typename... Args>
129 template <
typename Coll>
130 decltype(
auto) util::
values(Coll&& coll) {
132 (std::forward<Coll>(coll));
137 template <
typename Coll>
139 {
return values(std::as_const(coll)); }
145 #endif // LARCOREALG_COREUTILS_VALUES_H
double std(const std::vector< short > &wf, const double ped_mean, size_t start, size_t nsample)
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.