This commit is contained in:
Timur A. Fatkhullin
2025-03-22 00:48:52 +03:00
parent b9ee662850
commit b3fb445557
5 changed files with 71 additions and 40 deletions

View File

@@ -39,8 +39,8 @@ concept mcc_formattable =
requires(T v, std::format_context ctx) { std::formatter<std::remove_cvref_t<T>>().format(v, ctx); };
template <typename T>
// from https://stackoverflow.com/questions/74383254/concept-that-models-only-the-stdchrono-duration-types
template <typename T>
concept mcc_time_duration_c = requires {
[]<class Rep, class Period>(std::type_identity<std::chrono::duration<Rep, Period>>) {
@@ -48,6 +48,12 @@ concept mcc_time_duration_c = requires {
};
template <typename T>
concept mcc_systime_c = requires {
[]<class DT>(std::type_identity<std::chrono::sys_time<DT>>) {}(std::type_identity<std::remove_cvref_t<T>>());
};
/* a callable concept and its signature traits */
template <typename T>