From d12585de6cf0df39e71659343c61cf392f2c4adb Mon Sep 17 00:00:00 2001 From: asuessenbach Date: Mon, 27 Apr 2020 13:39:14 +0200 Subject: [PATCH] Use attribute [[deprecated]] only if __cplusplus >= 201402L. --- VulkanHppGenerator.cpp | 9 +++------ vulkan/vulkan.hpp | 9 +++------ 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/VulkanHppGenerator.cpp b/VulkanHppGenerator.cpp index 7afe7c2..e4c4f60 100644 --- a/VulkanHppGenerator.cpp +++ b/VulkanHppGenerator.cpp @@ -7612,12 +7612,9 @@ int main( int argc, char ** argv ) # endif #endif -#ifdef __has_cpp_attribute // Check if __has_cpp_attribute is present -# if __has_cpp_attribute(deprecated) // Check for an attribute -# define VULKAN_HPP_DEPRECATED(msg) [[deprecated(msg)]] -# endif -#endif -#ifndef VULKAN_HPP_DEPRECATED +#if __cplusplus >= 201402L +# define VULKAN_HPP_DEPRECATED( msg ) [[deprecated( msg )]] +#else # define VULKAN_HPP_DEPRECATED( msg ) #endif diff --git a/vulkan/vulkan.hpp b/vulkan/vulkan.hpp index 93cb254..9dea97a 100644 --- a/vulkan/vulkan.hpp +++ b/vulkan/vulkan.hpp @@ -171,12 +171,9 @@ static_assert( VK_HEADER_VERSION == 137, "Wrong VK_HEADER_VERSION!" ); # endif #endif -#ifdef __has_cpp_attribute // Check if __has_cpp_attribute is present -# if __has_cpp_attribute( deprecated ) // Check for an attribute -# define VULKAN_HPP_DEPRECATED( msg ) [[deprecated( msg )]] -# endif -#endif -#ifndef VULKAN_HPP_DEPRECATED +#if __cplusplus >= 201402L +# define VULKAN_HPP_DEPRECATED( msg ) [[deprecated( msg )]] +#else # define VULKAN_HPP_DEPRECATED( msg ) #endif