Add MSVC support for FOLLY_DEPRECATED
authorOrvid King <blah38621@gmail.com>
Tue, 28 Jul 2015 21:15:02 +0000 (14:15 -0700)
committerfacebook-github-bot-1 <folly-bot@fb.com>
Tue, 28 Jul 2015 22:22:22 +0000 (15:22 -0700)
Summary: This adds MSVC support for `FOLLY_DEPRECATED`.
Closes #257

Reviewed By: @yfeldblum

Differential Revision: D2283484

Pulled By: @sgolemon

folly/Portability.h

index 7f7a8a1fe6e4defe03fce87bff918f146840c2c9..23568db0486d16cdfdaad8120383f6cf9443822f 100644 (file)
@@ -82,6 +82,8 @@ struct MaxAlign { char c; } __attribute__((__aligned__));
 // deprecated
 #if defined(__clang__) || defined(__GNUC__)
 # define FOLLY_DEPRECATED(msg) __attribute__((__deprecated__(msg)))
+#elif defined(_MSC_VER)
+# define FOLLY_DEPRECATED(msg) __declspec(deprecated(msg))
 #else
 # define FOLLY_DEPRECATED
 #endif