From 1e67e5aba46a55d45f79cf8b715654f9b8803f19 Mon Sep 17 00:00:00 2001 From: Stephan Seitz Date: Fri, 19 Aug 2022 19:55:17 +0200 Subject: [PATCH] fix: use feature test macros for usage of Fixes #1394 --- VulkanHppGenerator.cpp | 4 ++-- vulkan/vulkan_to_string.hpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/VulkanHppGenerator.cpp b/VulkanHppGenerator.cpp index 256a930..9e47441 100644 --- a/VulkanHppGenerator.cpp +++ b/VulkanHppGenerator.cpp @@ -516,7 +516,7 @@ void VulkanHppGenerator::generateVulkanToStringHppFile() const #include -#if ( ( 20 <= VULKAN_HPP_CPP_VERSION ) && __has_include( ) ) +#if __cpp_lib_format # include // std::format #else # include // std::stringstream @@ -5034,7 +5034,7 @@ std::string VulkanHppGenerator::generateEnumsToString() const VULKAN_HPP_INLINE std::string toHexString( uint32_t value ) { -#if ( ( 20 <= VULKAN_HPP_CPP_VERSION ) && __has_include( ) ) +#if __cpp_lib_format return std::format( "{:x}", value ); #else std::stringstream stream; diff --git a/vulkan/vulkan_to_string.hpp b/vulkan/vulkan_to_string.hpp index 2e054d0..0595401 100644 --- a/vulkan/vulkan_to_string.hpp +++ b/vulkan/vulkan_to_string.hpp @@ -10,7 +10,7 @@ #include -#if ( ( 20 <= VULKAN_HPP_CPP_VERSION ) && __has_include( ) ) +#if __cpp_lib_format # include // std::format #else # include // std::stringstream @@ -2949,7 +2949,7 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_INLINE std::string toHexString( uint32_t value ) { -#if ( ( 20 <= VULKAN_HPP_CPP_VERSION ) && __has_include( ) ) +#if __cpp_lib_format return std::format( "{:x}", value ); #else std::stringstream stream;