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

@@ -108,17 +108,17 @@ private:
static_assert(mcc::mcc_error_c<mcc::impl::MccError>, "");
// a helper formatter impelementation
// // a helper formatter impelementation
template <typename T>
requires std::is_enum_v<T>
struct std::formatter<T, char> : std::formatter<std::underlying_type_t<T>, char> {
auto format(T e, auto& ctx) const
{
return formatter<std::underlying_type_t<T>>::format(std::underlying_type_t<T>(e), ctx);
}
};
// template <typename T>
// requires std::is_enum_v<T>
// struct std::formatter<T, char> : std::formatter<std::underlying_type_t<T>, char> {
// auto format(T e, auto& ctx) const
// {
// return formatter<std::underlying_type_t<T>>::format(std::underlying_type_t<T>(e), ctx);
// }
// };
enum class EE : int { A, B, C };
// enum class EE : int { A, B, C };
static_assert(mcc::mcc_error_c<EE>, "");
// static_assert(mcc::mcc_error_c<EE>, "");