Use attribute [[deprecated]] only if __cplusplus >= 201402L.

This commit is contained in:
asuessenbach 2020-04-27 13:39:14 +02:00
parent b58aa05aeb
commit d12585de6c
2 changed files with 6 additions and 12 deletions

View File

@ -7612,12 +7612,9 @@ int main( int argc, char ** argv )
# endif # endif
#endif #endif
#ifdef __has_cpp_attribute // Check if __has_cpp_attribute is present #if __cplusplus >= 201402L
# if __has_cpp_attribute(deprecated) // Check for an attribute # define VULKAN_HPP_DEPRECATED( msg ) [[deprecated( msg )]]
# define VULKAN_HPP_DEPRECATED(msg) [[deprecated(msg)]] #else
# endif
#endif
#ifndef VULKAN_HPP_DEPRECATED
# define VULKAN_HPP_DEPRECATED( msg ) # define VULKAN_HPP_DEPRECATED( msg )
#endif #endif

View File

@ -171,12 +171,9 @@ static_assert( VK_HEADER_VERSION == 137, "Wrong VK_HEADER_VERSION!" );
# endif # endif
#endif #endif
#ifdef __has_cpp_attribute // Check if __has_cpp_attribute is present #if __cplusplus >= 201402L
# if __has_cpp_attribute( deprecated ) // Check for an attribute # define VULKAN_HPP_DEPRECATED( msg ) [[deprecated( msg )]]
# define VULKAN_HPP_DEPRECATED( msg ) [[deprecated( msg )]] #else
# endif
#endif
#ifndef VULKAN_HPP_DEPRECATED
# define VULKAN_HPP_DEPRECATED( msg ) # define VULKAN_HPP_DEPRECATED( msg )
#endif #endif