aboutsummaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2024-05-03 19:38:57 +0200
committerShauren <shauren.trinity@gmail.com>2024-05-03 19:38:57 +0200
commit2aedd8ecdb16a8c72ff89c6c09ad99fff23609b1 (patch)
treec41a865d3e7b97807886b827b4aef6d005ddefa6 /src/common
parent22e657eac127e41324d8e4d7406c8b53c1ec29d4 (diff)
Dep/fmt: Upgrade to 10.2.1
Diffstat (limited to 'src/common')
-rw-r--r--src/common/Utilities/StringFormat.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/common/Utilities/StringFormat.h b/src/common/Utilities/StringFormat.h
index 3ec91494ef2..6f5e9a643bd 100644
--- a/src/common/Utilities/StringFormat.h
+++ b/src/common/Utilities/StringFormat.h
@@ -122,4 +122,8 @@ struct fmt::formatter<Optional<T>, Char> : formatter<T, Char>
}
};
+// allow implicit enum to int conversions for formatting
+template <typename E, std::enable_if_t<std::is_enum_v<E>, std::nullptr_t> = nullptr>
+auto format_as(E e) { return std::underlying_type_t<E>(e); }
+
#endif