|
19 | 19 | #ifndef LIBBITCOIN_SYSTEM_BOOST_HPP |
20 | 20 | #define LIBBITCOIN_SYSTEM_BOOST_HPP |
21 | 21 |
|
| 22 | +/////////////////////////////////////////////////////////////////////////////// |
| 23 | +// Include boost only here, so these definitions take hold within boost. |
| 24 | +// Dependent projects must include <bitcoin/system.hpp> before any boost. |
| 25 | +/////////////////////////////////////////////////////////////////////////////// |
| 26 | + |
22 | 27 | #include <utility> |
23 | 28 |
|
24 | 29 | // Apply any warning suppressions to boost. |
25 | | -// Any boost includes within headers will not benefit from suppression, as the |
26 | | -// warnings are included by define.hpp which follows boost includes. |
27 | 30 | #include <bitcoin/system/warnings.hpp> |
28 | 31 |
|
29 | | -// Include boost only from here, so this exclusion works. |
| 32 | +// Headers only containers. |
| 33 | +#define BOOST_CONTAINER_NO_LIB |
| 34 | + |
30 | 35 | // Avoid namespace conflict between boost::placeholders and std::placeholders. |
31 | 36 | // This arises when including <functional>, which declares std::placeholders. |
32 | 37 | // www.boost.org/doc/libs/1_78_0/boost/bind.hpp |
33 | | -// Include boost only from here, so placeholders exclusion works. |
34 | 38 | #define BOOST_BIND_NO_PLACEHOLDERS |
35 | 39 | #include <boost/bind.hpp> |
36 | 40 |
|
| 41 | +// Include boost only from here, so this definition works. |
| 42 | +#if defined(HAVE_ICU) |
| 43 | + #define BOOST_HAS_ICU |
| 44 | +#endif |
| 45 | +#include <boost/locale.hpp> |
| 46 | + |
| 47 | +// address::from_string |
| 48 | +////#define BOOST_ASIO_NO_DEPRECATED |
37 | 49 | #include <boost/asio.hpp> |
38 | 50 | #include <boost/format.hpp> |
39 | 51 | #include <boost/iostreams/stream.hpp> |
| 52 | + |
| 53 | +// Headers only json. |
| 54 | +#define BOOST_JSON_NO_LIB |
40 | 55 | #include <boost/json.hpp> |
41 | | -#include <boost/locale.hpp> |
42 | 56 | #include <boost/multiprecision/cpp_int.hpp> |
43 | 57 | #include <boost/program_options.hpp> |
44 | 58 | #include <boost/url.hpp> |
|
0 commit comments