diff --git a/openVulkanoCpp/Extensions/FmtFormatter.hpp b/openVulkanoCpp/Extensions/FmtFormatter.hpp index 52fa524..fe29f17 100644 --- a/openVulkanoCpp/Extensions/FmtFormatter.hpp +++ b/openVulkanoCpp/Extensions/FmtFormatter.hpp @@ -324,12 +324,18 @@ struct fmt::formatter }; template<> -struct fmt::formatter : fmt::formatter +struct fmt::formatter { - template - auto format(const UNDERLYING_FLOAT16_TYPE& f, FormatContext& ctx) const + template + constexpr auto parse(ParseContext& ctx) { - return fmt::formatter::format(static_cast(f), ctx); + return fmt::formatter{}.parse(ctx); + } + + template + auto format(const float16& f, FormatContext& ctx) const + { + return fmt::formatter{}.format(static_cast(f), ctx); } }; diff --git a/openVulkanoCpp/Math/Float16.hpp b/openVulkanoCpp/Math/Float16.hpp index 372fb7c..8cc7531 100644 --- a/openVulkanoCpp/Math/Float16.hpp +++ b/openVulkanoCpp/Math/Float16.hpp @@ -15,13 +15,10 @@ // map a half float type, if available, to float16 #if __has_keyword(_Float16) typedef _Float16 float16; - #define UNDERLYING_FLOAT16_TYPE _Float16 #elif __has_keyword(__fp16) typedef __fp16 float16; - #define UNDERLYING_FLOAT16_TYPE __fp16 #else #define USING_CUSTOM_FLOAT16 - #define UNDERLYING_FLOAT16_TYPE float16 class float16 {