mirror of
https://github.com/google/benchmark.git
synced 2024-12-28 21:40:15 +08:00
Revert "Add BENCHMARK_TEMPLATE1 macro"
I didn't mean to commit this to master.
This reverts commit b7d03ac4f5
.
This commit is contained in:
parent
b7d03ac4f5
commit
a6a90ec6b8
@ -445,7 +445,7 @@ class Benchmark {
|
|||||||
// BENCHMARK_TEMPLATE(BM_Foo, 1);
|
// BENCHMARK_TEMPLATE(BM_Foo, 1);
|
||||||
//
|
//
|
||||||
// will register BM_Foo<1> as a benchmark.
|
// will register BM_Foo<1> as a benchmark.
|
||||||
# define BENCHMARK_TEMPLATE1(n, a) \
|
#define BENCHMARK_TEMPLATE(n, a) \
|
||||||
static ::benchmark::internal::Benchmark* BENCHMARK_CONCAT( \
|
static ::benchmark::internal::Benchmark* BENCHMARK_CONCAT( \
|
||||||
__benchmark_, n, __LINE__) BENCHMARK_UNUSED = \
|
__benchmark_, n, __LINE__) BENCHMARK_UNUSED = \
|
||||||
(new ::benchmark::internal::Benchmark(#n "<" #a ">", n<a>))
|
(new ::benchmark::internal::Benchmark(#n "<" #a ">", n<a>))
|
||||||
@ -455,16 +455,6 @@ class Benchmark {
|
|||||||
__benchmark_, n, __LINE__) BENCHMARK_UNUSED = \
|
__benchmark_, n, __LINE__) BENCHMARK_UNUSED = \
|
||||||
(new ::benchmark::internal::Benchmark(#n "<" #a "," #b ">", n<a, b>))
|
(new ::benchmark::internal::Benchmark(#n "<" #a "," #b ">", n<a, b>))
|
||||||
|
|
||||||
#if __cplusplus >= 201103L
|
|
||||||
#define BENCHMARK_TEMPLATE(n, ...) \
|
|
||||||
static ::benchmark::internal::Benchmark* BENCHMARK_CONCAT( \
|
|
||||||
_benchmark_, n, __LINE__) BENCHMARK_UNUSED = \
|
|
||||||
(new ::benchmark::internal::Benchmark( \
|
|
||||||
#n "<" #__VA_ARGS__ ">", n< __VA_ARGS__ > ))
|
|
||||||
#else
|
|
||||||
#define BENCHMARK_TEMPLATE(n, a) BENCHMARK_TEMPLATE1(n, a)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// Helper macro to create a main routine in a test that runs the benchmarks
|
// Helper macro to create a main routine in a test that runs the benchmarks
|
||||||
#define BENCHMARK_MAIN() \
|
#define BENCHMARK_MAIN() \
|
||||||
int main(int argc, const char** argv) { \
|
int main(int argc, const char** argv) { \
|
||||||
|
Loading…
Reference in New Issue
Block a user