16 #include <range/v3/numeric/accumulate.hpp>
35 template <
typename ...errors_t>
37 requires
sizeof...(errors_t) <= 4 &&
49 template <
typename ..._errors_t>
50 static constexpr
bool check_consistency(_errors_t ...errors)
52 if constexpr (
sizeof...(errors) < 2)
58 return [] (
auto head,
auto ...tail) constexpr
60 using head_t = decltype(head);
61 if constexpr (((head_t::_id != decltype(tail)::_id) && ...))
62 return check_consistency(tail...);
69 static_assert(check_consistency(errors_t{}...),
70 "You may not use the same error specifier more than once.");
76 static constexpr detail::search_config_id
id{detail::search_config_id::max_error};
114 requires
sizeof...(errors_t) > 0
118 detail::for_each([
this](
auto e)
121 }, std::forward<errors_t>(errors)...);
131 static_cast<uint8_t>(0)));
142 max_error() -> max_error<>;
146 template <
typename ...errors_t>
147 max_error(errors_t && ...) -> max_error<remove_cvref_t<errors_t>...>;