configurable alignment for Arena
[folly.git] / folly / Preprocessor.h
index 20fafabf9000369753312a6853fac00a5eb32da9..c7e580d81d4d947405caec69ce8c95f833d9b027 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright 2013 Facebook, Inc.
+ * Copyright 2014 Facebook, Inc.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 // Support macro for the above
 #define FB_ARG_2_OR_1_IMPL(a, b, ...) b
 
+/**
+ * Helper macro that provides a way to pass argument with commas in it to
+ * some other macro whose syntax doesn't allow using extra parentheses.
+ * Example:
+ *
+ *   #define MACRO(type, name) type name
+ *   MACRO(FB_SINGLE_ARG(std::pair<size_t, size_t>), x);
+ *
+ */
+#define FB_SINGLE_ARG(...) __VA_ARGS__
+
 /**
  * FB_ANONYMOUS_VARIABLE(str) introduces an identifier starting with
  * str and ending with a number that varies with the line.
 #endif
 
 /**
- * Use FB_STRINGIZE(name) when you'd want to do what #name does inside
+ * Use FB_STRINGIZE(x) when you'd want to do what #x does inside
  * another macro expansion.
  */
-#define FB_STRINGIZE(name) #name
-
+#define FB_STRINGIZE(x) #x
 
 #endif // FOLLY_PREPROCESSOR_