Commit 77f0c0d9 authored by Yedidya Feldblum's avatar Yedidya Feldblum Committed by Facebook GitHub Bot

let [[maybe_unused]] wrapper support msvc

Summary: Let `FOLLY_MAYBE_UNUSED` which wraps `[[maybe_unused]]` support MSVC even when the latter misreports `__cplusplus`.

Differential Revision: D26537706

fbshipit-source-id: 37554b7f9d27332088b72de41e53a5b85ef46327
parent 36eb535c
...@@ -77,7 +77,7 @@ ...@@ -77,7 +77,7 @@
* #endif * #endif
* } * }
*/ */
#if FOLLY_HAS_CPP_ATTRIBUTE(maybe_unused) && __cplusplus >= 201703L #if FOLLY_HAS_CPP_ATTRIBUTE(maybe_unused) && FOLLY_CPLUSPLUS >= 201703L
#define FOLLY_MAYBE_UNUSED [[maybe_unused]] #define FOLLY_MAYBE_UNUSED [[maybe_unused]]
#elif FOLLY_HAS_CPP_ATTRIBUTE(gnu::unused) || __GNUC__ #elif FOLLY_HAS_CPP_ATTRIBUTE(gnu::unused) || __GNUC__
#define FOLLY_MAYBE_UNUSED [[gnu::unused]] #define FOLLY_MAYBE_UNUSED [[gnu::unused]]
......
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