Handle MSVC's preprocessor oddities in the SharedMutex test 2016.07.26
authorChristopher Dykes <cdykes@fb.com>
Tue, 26 Jul 2016 15:37:22 +0000 (08:37 -0700)
committerFacebook Github Bot 3 <facebook-github-bot-3-bot@fb.com>
Tue, 26 Jul 2016 15:38:39 +0000 (08:38 -0700)
Summary: MSVC needs a bit more glue to expand the varargs.

Reviewed By: yfeldblum

Differential Revision: D3614681

fbshipit-source-id: 901d8c5138b1d2d28434c51bdff31f6d21f26681

folly/test/SharedMutexTest.cpp

index 43e6dd174d2f5de104173b0e31b51ae8346884f3..7ca552395be3cfa083cfad5880ae03aeff3f4581 100644 (file)
@@ -1371,8 +1371,8 @@ BENCHMARK(single_thread_lock_unlock, iters) {
   }
 }
 
-#define BENCH_BASE(...) BENCHMARK_NAMED_PARAM(__VA_ARGS__)
-#define BENCH_REL(...) BENCHMARK_RELATIVE_NAMED_PARAM(__VA_ARGS__)
+#define BENCH_BASE(...) FB_VA_GLUE(BENCHMARK_NAMED_PARAM, (__VA_ARGS__))
+#define BENCH_REL(...) FB_VA_GLUE(BENCHMARK_RELATIVE_NAMED_PARAM, (__VA_ARGS__))
 
 // 100% reads.  Best-case scenario for deferred locks.  Lock is colocated
 // with read data, so inline lock takes cache miss every time but deferred