+/**
+ * Maybe_unused indicates that a function, variable or parameter might or
+ * might not be used, e.g.
+ *
+ * int foo(FOLLY_MAYBE_UNUSED int x) {
+ * #ifdef USE_X
+ * return x;
+ * #else
+ * return 0;
+ * #endif
+ * }
+ */
+#if FOLLY_HAS_CPP_ATTRIBUTE(maybe_unused)
+#define FOLLY_MAYBE_UNUSED [[maybe_unused]]
+#elif FOLLY_HAS_ATTRIBUTE(__unused__) || __GNUC__
+#define FOLLY_MAYBE_UNUSED __attribute__((__unused__))
+#else
+#define FOLLY_MAYBE_UNUSED
+#endif
+