Skip to content

Commit 1e69800

Browse files
committed
Merge #21059: Drop boost/preprocessor dependencies
e99db77 Drop boost/preprocessor dependencies (Hennadii Stepanov) 12f5028 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 e99db77 practicalswift: cr ACK e99db77 Tree-SHA512: 7ec15c2780a661e293c990f64c41b5b451d894cc191aa7872fbcaf96da91915a351209b1f1003ab12a7a16cb464e50ac58a028db02beeedfa5f6931752c2d9e2
2 parents f72d80b + e99db77 commit 1e69800

File tree

4 files changed

+13
-13
lines changed

4 files changed

+13
-13
lines changed

src/bench/bench.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@
55
#ifndef BITCOIN_BENCH_BENCH_H
66
#define BITCOIN_BENCH_BENCH_H
77

8+
#include <util/macros.h>
9+
810
#include <chrono>
911
#include <functional>
1012
#include <map>
1113
#include <string>
1214
#include <vector>
1315

1416
#include <bench/nanobench.h>
15-
#include <boost/preprocessor/cat.hpp>
16-
#include <boost/preprocessor/stringize.hpp>
1717

1818
/*
1919
* Usage:
@@ -56,8 +56,8 @@ class BenchRunner
5656
static void RunAll(const Args& args);
5757
};
5858
}
59-
// BENCHMARK(foo) expands to: benchmark::BenchRunner bench_11foo("foo");
59+
// BENCHMARK(foo) expands to: benchmark::BenchRunner bench_11foo("foo", foo);
6060
#define BENCHMARK(n) \
61-
benchmark::BenchRunner BOOST_PP_CAT(bench_, BOOST_PP_CAT(__LINE__, n))(BOOST_PP_STRINGIZE(n), n);
61+
benchmark::BenchRunner PASTE2(bench_, PASTE2(__LINE__, n))(STRINGIZE(n), n);
6262

6363
#endif // BITCOIN_BENCH_BENCH_H

src/clientversion.h

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
#ifndef BITCOIN_CLIENTVERSION_H
66
#define BITCOIN_CLIENTVERSION_H
77

8+
#include <util/macros.h>
9+
810
#if defined(HAVE_CONFIG_H)
911
#include <config/bitcoin-config.h>
1012
#endif //HAVE_CONFIG_H
@@ -14,13 +16,6 @@
1416
#error Client version information missing: version is not defined by bitcoin-config.h or in any other way
1517
#endif
1618

17-
/**
18-
* Converts the parameter X to a string after macro replacement on X has been performed.
19-
* Don't merge these into one macro!
20-
*/
21-
#define STRINGIZE(X) DO_STRINGIZE(X)
22-
#define DO_STRINGIZE(X) #X
23-
2419
//! Copyright string used in Windows .rc files
2520
#define COPYRIGHT_STR "2009-" STRINGIZE(COPYRIGHT_YEAR) " " COPYRIGHT_HOLDERS_FINAL
2621

src/util/macros.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,11 @@
88
#define PASTE(x, y) x ## y
99
#define PASTE2(x, y) PASTE(x, y)
1010

11+
/**
12+
* Converts the parameter X to a string after macro replacement on X has been performed.
13+
* Don't merge these into one macro!
14+
*/
15+
#define STRINGIZE(X) DO_STRINGIZE(X)
16+
#define DO_STRINGIZE(X) #X
17+
1118
#endif // BITCOIN_UTIL_MACROS_H

test/lint/lint-includes.sh

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,6 @@ EXPECTED_BOOST_INCLUDES=(
6060
boost/multi_index/ordered_index.hpp
6161
boost/multi_index/sequenced_index.hpp
6262
boost/multi_index_container.hpp
63-
boost/preprocessor/cat.hpp
64-
boost/preprocessor/stringize.hpp
6563
boost/process.hpp
6664
boost/signals2/connection.hpp
6765
boost/signals2/optional_last_value.hpp

0 commit comments

Comments
 (0)