This commit is contained in:
Timur A. Fatkhullin
2026-02-01 00:10:28 +03:00
parent bfd668cff2
commit a4d6f17114
2 changed files with 147 additions and 23 deletions

View File

@@ -60,8 +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, 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); };
// concept mcc_formattable =
// requires(T v, std::format_context ctx) { std::formatter<std::remove_cvref_t<T>>().format(v, ctx); };
// from https://stackoverflow.com/questions/74383254/concept-that-models-only-the-stdchrono-duration-types