...
This commit is contained in:
22
mcc_error.h
22
mcc_error.h
@@ -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>, "");
|
||||
|
||||
Reference in New Issue
Block a user