Merge #21059: Drop boost/preprocessor dependencies

e99db77a6e Drop boost/preprocessor dependencies (Hennadii Stepanov)
12f5028d49 refactor: Move STRINGIZE macro to macros.h (Hennadii Stepanov)

Pull request description:

  Use own macros instead of boost's ones.

ACKs for top commit:
  laanwj:
    Code review ACK e99db77a6e
  practicalswift:
    cr ACK e99db77a6e

Tree-SHA512: 7ec15c2780a661e293c990f64c41b5b451d894cc191aa7872fbcaf96da91915a351209b1f1003ab12a7a16cb464e50ac58a028db02beeedfa5f6931752c2d9e2
This commit is contained in:
Wladimir J. van der Laan
2021-02-02 10:02:14 +01:00
4 changed files with 13 additions and 13 deletions

View File

@@ -5,6 +5,8 @@
#ifndef BITCOIN_BENCH_BENCH_H
#define BITCOIN_BENCH_BENCH_H
#include <util/macros.h>
#include <chrono>
#include <functional>
#include <map>
@@ -12,8 +14,6 @@
#include <vector>
#include <bench/nanobench.h>
#include <boost/preprocessor/cat.hpp>
#include <boost/preprocessor/stringize.hpp>
/*
* Usage:
@@ -56,8 +56,8 @@ public:
static void RunAll(const Args& args);
};
}
// BENCHMARK(foo) expands to: benchmark::BenchRunner bench_11foo("foo");
// BENCHMARK(foo) expands to: benchmark::BenchRunner bench_11foo("foo", foo);
#define BENCHMARK(n) \
benchmark::BenchRunner BOOST_PP_CAT(bench_, BOOST_PP_CAT(__LINE__, n))(BOOST_PP_STRINGIZE(n), n);
benchmark::BenchRunner PASTE2(bench_, PASTE2(__LINE__, n))(STRINGIZE(n), n);
#endif // BITCOIN_BENCH_BENCH_H