diff --git a/openVulkanoCpp/Extensions/FmtFormatter.hpp b/openVulkanoCpp/Extensions/FmtFormatter.hpp index fe29f17..52fa524 100644 --- a/openVulkanoCpp/Extensions/FmtFormatter.hpp +++ b/openVulkanoCpp/Extensions/FmtFormatter.hpp @@ -324,18 +324,12 @@ struct fmt::formatter }; template<> -struct fmt::formatter +struct fmt::formatter : fmt::formatter { - template - constexpr auto parse(ParseContext& ctx) - { - return fmt::formatter{}.parse(ctx); - } - template - auto format(const float16& f, FormatContext& ctx) const + auto format(const UNDERLYING_FLOAT16_TYPE& f, FormatContext& ctx) const { - return fmt::formatter{}.format(static_cast(f), ctx); + return fmt::formatter::format(static_cast(f), ctx); } }; diff --git a/openVulkanoCpp/Math/Float16.hpp b/openVulkanoCpp/Math/Float16.hpp index 8cc7531..372fb7c 100644 --- a/openVulkanoCpp/Math/Float16.hpp +++ b/openVulkanoCpp/Math/Float16.hpp @@ -15,10 +15,13 @@ // 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 {