This commit is contained in:
2026-05-30 16:21:45 +03:00
parent 434521a435
commit 21d79a4cb5
6 changed files with 1073 additions and 46 deletions

View File

@@ -86,6 +86,17 @@ struct adc_char_identity {
}
};
// std::array, std::span(v_t, N), std::tuple
template <typename R>
concept adc_fixed_size_range = std::ranges::range<R> && requires { std::tuple_size<std::remove_cvref_t<R>>::value; };
// non-resizable ranges
template <typename R>
concept adc_non_resizable_range = std::ranges::range<R> && !requires(R r, std::size_t n) { r.resize(n); };
// deduce returned type of callable
// template <typename T>
// using adc_retval_t = std::invoke_result_t<std::remove_cvref_t<T>>;
@@ -270,6 +281,13 @@ using adc_common_duration_t = adc_duration_common_type_t<std::chrono::nanosecond
std::chrono::years>;
template <typename T>
concept adc_time_point_c = requires {
[]<typename ClockT, typename DurT>(std::type_identity<std::chrono::time_point<ClockT, DurT>>) {
}(std::type_identity<std::remove_cvref_t<T>>());
};
// concept for hashable types
template <typename T>
concept adc_hashable_c = requires(T t) {