Skip to content

Commit a2844ee

Browse files
tobbichristophe-lunarg
authored andcommitted
Use [[deprecated]] when CXX standard is at least 14
Fixes #1269
1 parent 0904870 commit a2844ee

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

glm/detail/setup.hpp

+5-1
Original file line numberDiff line numberDiff line change
@@ -594,7 +594,11 @@
594594
# define GLM_DEPRECATED __declspec(deprecated)
595595
# define GLM_ALIGNED_TYPEDEF(type, name, alignment) typedef __declspec(align(alignment)) type name
596596
#elif GLM_COMPILER & (GLM_COMPILER_GCC | GLM_COMPILER_CLANG | GLM_COMPILER_INTEL)
597-
# define GLM_DEPRECATED __attribute__((__deprecated__))
597+
# if GLM_LANG & GLM_LANG_CXX14_FLAG
598+
# define GLM_DEPRECATED [[deprecated]]
599+
# else
600+
# define GLM_DEPRECATED __attribute__((__deprecated__))
601+
# endif
598602
# define GLM_ALIGNED_TYPEDEF(type, name, alignment) typedef type name __attribute__((aligned(alignment)))
599603
#elif (GLM_COMPILER & GLM_COMPILER_CUDA) || (GLM_COMPILER & GLM_COMPILER_HIP)
600604
# define GLM_DEPRECATED

0 commit comments

Comments
 (0)