From: Christopher Dykes Date: Fri, 1 Jul 2016 01:47:32 +0000 (-0700) Subject: Don't use named variadic macro parameters X-Git-Tag: 2016.07.26~93 X-Git-Url: http://plrg.eecs.uci.edu/git/?p=folly.git;a=commitdiff_plain;h=1880e8511e3067480051e7e01839cb7771761edf Don't use named variadic macro parameters Summary: MSVC doesn't support them, so use `__VA_ARGS__` instead. Reviewed By: yfeldblum Differential Revision: D3507071 fbshipit-source-id: 186834c87e74257c709fcbc08e3bda7b1b55d02b --- diff --git a/folly/test/DeterministicSchedule.h b/folly/test/DeterministicSchedule.h index b04e613a..c6a1aeb2 100644 --- a/folly/test/DeterministicSchedule.h +++ b/folly/test/DeterministicSchedule.h @@ -37,11 +37,12 @@ namespace test { // This is ugly, but better perf for DeterministicAtomic translates // directly to more states explored and tested -#define FOLLY_TEST_DSCHED_VLOG(msg...) \ - do { \ - if (false) { \ - VLOG(2) << std::hex << std::this_thread::get_id() << ": " << msg; \ - } \ +#define FOLLY_TEST_DSCHED_VLOG(...) \ + do { \ + if (false) { \ + VLOG(2) << std::hex << std::this_thread::get_id() << ": " \ + << __VA_ARGS__; \ + } \ } while (false) /** diff --git a/folly/test/SharedMutexTest.cpp b/folly/test/SharedMutexTest.cpp index da567f83..43e6dd17 100644 --- a/folly/test/SharedMutexTest.cpp +++ b/folly/test/SharedMutexTest.cpp @@ -1371,8 +1371,8 @@ BENCHMARK(single_thread_lock_unlock, iters) { } } -#define BENCH_BASE(args...) BENCHMARK_NAMED_PARAM(args) -#define BENCH_REL(args...) BENCHMARK_RELATIVE_NAMED_PARAM(args) +#define BENCH_BASE(...) BENCHMARK_NAMED_PARAM(__VA_ARGS__) +#define BENCH_REL(...) 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