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