Merge pull request #581 from asuessenbach/deprecated

Use attribute [[deprecated]] only if __cplusplus >= 201402L.
This commit is contained in:
Andreas Süßenbach 2020-04-27 16:07:18 +02:00 committed by GitHub
commit 6525c33958
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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
# 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

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
# 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