Added [[deprected]] attribute support for vc14
authorkhizmax <libcds.dev@gmail.com>
Tue, 15 Sep 2015 20:53:57 +0000 (23:53 +0300)
committerkhizmax <libcds.dev@gmail.com>
Tue, 15 Sep 2015 20:53:57 +0000 (23:53 +0300)
cds/compiler/vc/defs.h

index 596a7a3d7a6bf068049872c5de833e8922591603..4d8540b28a12315e2d1c46c4f7bda0a48f3f10ad 100644 (file)
 #define CDS_CLASS_ALIGNMENT(n)    __declspec( align(n) )
 
 // Attributes
-#define CDS_DEPRECATED( reason ) __declspec(deprecated( reason ))
+#if CDS_COMPILER_VERSION >= CDS_COMPILER_MSVC14
+#   define CDS_DEPRECATED( reason ) [[deprecated( reason )]]
+#else
+#   define CDS_DEPRECATED( reason ) __declspec(deprecated( reason ))
+#endif
 
 #include <cds/compiler/vc/compiler_barriers.h>