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
#ifdef __has_cpp_attribute // Check if __has_cpp_attribute is present
# if __has_cpp_attribute(deprecated) // Check for an attribute
#if __cplusplus >= 201402L
# define VULKAN_HPP_DEPRECATED( msg ) [[deprecated( msg )]]
# endif
#endif
#ifndef VULKAN_HPP_DEPRECATED
#else
# define VULKAN_HPP_DEPRECATED( msg )
#endif

View File

@ -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
#if __cplusplus >= 201402L
# define VULKAN_HPP_DEPRECATED( msg ) [[deprecated( msg )]]
# endif
#endif
#ifndef VULKAN_HPP_DEPRECATED
#else
# define VULKAN_HPP_DEPRECATED( msg )
#endif