Commit 014ffabd authored by Ben Maurer's avatar Ben Maurer Committed by Noam Lerner

Add a pretty macro for deprecation

Summary: Make it easy for people to mark code as deprecated

Test Plan: Chose a random file and added the FOLLY_DEPRECATED macro to it

Reviewed By: yfeldblum@fb.com

Subscribers: ps, folly-diffs@, yfeldblum

FB internal diff: D1943248

Signature: t1:1943248:1427316689:b3305d134f374697e93d36bafbf0961eec1ef68a
parent 0dee3980
......@@ -79,6 +79,13 @@ struct MaxAlign { char c; } __attribute__((__aligned__));
__attribute__((__format__(__printf__, format_param, dots_param)))
#endif
// deprecated
#if defined(__clang__) || defined(__GNUC__)
# define FOLLY_DEPRECATED(msg) __attribute__((__deprecated__(msg)))
#else
# define FOLLY_DEPRECATED
#endif
// noreturn
#if defined(_MSC_VER)
# define FOLLY_NORETURN __declspec(noreturn)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment