This commit is contained in:
Timur A. Fatkhullin
2026-02-02 02:36:23 +03:00
parent a4d6f17114
commit ae91e7320c
11 changed files with 1311 additions and 103 deletions

View File

@@ -60,9 +60,9 @@ concept mcc_range_of_output_char_range =
// https://stackoverflow.com/questions/72430369/how-to-check-that-a-type-is-formattable-using-type-traits-concepts)
template <typename T>
concept mcc_formattable = requires(T v) { [](T vv) { return std::format("{}", vv); }(v); };
// concept mcc_formattable =
// requires(T v, std::format_context ctx) { std::formatter<std::remove_cvref_t<T>>().format(v, ctx); };
concept mcc_formattable =
requires(T v, std::format_context ctx) { std::formatter<std::remove_cvref_t<T>>().format(v, ctx); };
// concept mcc_formattable = requires(T v) { [](T vv) { return std::format("{}", vv); }(v); };
// from https://stackoverflow.com/questions/74383254/concept-that-models-only-the-stdchrono-duration-types