#pragma once
#include <iterator><--- Include file: not found. Please note: Cppcheck does not need standard library headers to get proper results.
#include "snippet/aliases.hpp"
#include "internal/dev_env.hpp"
#include "internal/types.hpp"
#include "internal/auto_holder.hpp"
namespace uni {
template<class T, class Container = dynamic_auto_holder<T, internal::size_t>>
struct counter : Container {
counter() noexcept(NO_EXCEPT) = default;
template<std::input_iterator I, std::sentinel_for<I> S>
counter(I first, S last) noexcept(NO_EXCEPT) {
for(auto itr = first; itr != last; ++itr) ++(*this)[*itr];
}
template<std::ranges::input_range R>
explicit counter(R&& range) noexcept(NO_EXCEPT) : counter(ALL(range)) {}
};
template<std::input_iterator I, std::sentinel_for<I> S>
explicit counter(I, S) -> counter<std::iter_value_t<I>>;
template<std::ranges::input_range R>
explicit counter(R) -> counter<std::ranges::range_value_t<R>>;
} // namespace uni