From 6c89be688594525894bc658f68bddf368dcb0139 Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Tue, 24 Nov 2020 14:36:30 +0800 Subject: [PATCH] src/*: drop backward compatibility with boost<1.72 boost 1.72 is required to build Ceph since 713efb66e8d7b2585dfd6783f8f23ce409b50871. so there is no need to be backward compatible with older Boost libraries. Signed-off-by: Kefu Chai --- src/json_spirit/json_spirit_reader_template.h | 23 ++++++------------- src/rgw/rgw_dmclock_async_scheduler.h | 4 ---- src/rgw/rgw_reshard.h | 4 ---- src/test/confutils.cc | 20 ---------------- 4 files changed, 7 insertions(+), 44 deletions(-) diff --git a/src/json_spirit/json_spirit_reader_template.h b/src/json_spirit/json_spirit_reader_template.h index 7d394b26e7d..a5790b9b5e1 100644 --- a/src/json_spirit/json_spirit_reader_template.h +++ b/src/json_spirit/json_spirit_reader_template.h @@ -20,27 +20,18 @@ #include #include #include - -#if BOOST_VERSION >= 103800 - #include - #include - #include - #include - #include - #define spirit_namespace boost::spirit::classic -#else - #include - #include - #include - #include - #include - #define spirit_namespace boost::spirit -#endif +#include +#include +#include +#include +#include #include "include/ceph_assert.h" namespace json_spirit { + namespace spirit_namespace = boost::spirit::classic; + const spirit_namespace::int_parser < boost::int64_t > int64_p = spirit_namespace::int_parser < boost::int64_t >(); const spirit_namespace::uint_parser< boost::uint64_t > uint64_p = spirit_namespace::uint_parser< boost::uint64_t >(); diff --git a/src/rgw/rgw_dmclock_async_scheduler.h b/src/rgw/rgw_dmclock_async_scheduler.h index 20c04a66679..2a4c99f20a8 100644 --- a/src/rgw/rgw_dmclock_async_scheduler.h +++ b/src/rgw/rgw_dmclock_async_scheduler.h @@ -82,12 +82,8 @@ class AsyncScheduler : public md_config_obs_t, public Scheduler { using Completion = async::Completion>; using Clock = ceph::coarse_real_clock; -#if BOOST_VERSION < 107000 - using Timer = boost::asio::basic_waitable_timer; -#else using Timer = boost::asio::basic_waitable_timer, executor_type>; -#endif Timer timer; //< timer for the next scheduled request CephContext *const cct; diff --git a/src/rgw/rgw_reshard.h b/src/rgw/rgw_reshard.h index 4bfbf5f810a..a5c190f5914 100644 --- a/src/rgw/rgw_reshard.h +++ b/src/rgw/rgw_reshard.h @@ -253,13 +253,9 @@ class RGWReshardWait { ceph::condition_variable cond; struct Waiter : boost::intrusive::list_base_hook<> { -#if BOOST_VERSION < 107000 - using Timer = boost::asio::basic_waitable_timer; -#else using Executor = boost::asio::io_context::executor_type; using Timer = boost::asio::basic_waitable_timer, Executor>; -#endif Timer timer; explicit Waiter(boost::asio::io_context& ioc) : timer(ioc) {} }; diff --git a/src/test/confutils.cc b/src/test/confutils.cc index 831e913351f..88e5bf450ac 100644 --- a/src/test/confutils.cc +++ b/src/test/confutils.cc @@ -231,17 +231,6 @@ const char illegal_conf4[] = "\ keyring = osd_keyring ; osd's keyring\n\ "; -#if BOOST_VERSION < 107200 -// Boost::spirit > 1.72 asserts on chars that are not < 0x7f -// unicode config file -const char unicode_config_1[] = "\ -[global]\n\ - log file = \x66\xd1\x86\xd1\x9d\xd3\xad\xd3\xae \n\ - pid file = foo-bar\n\ -[osd0]\n\ -"; -#endif - const char override_config_1[] = "\ [global]\n\ log file = global_log\n\ @@ -365,15 +354,6 @@ TEST(ConfUtils, ReadFiles2) { ASSERT_EQ(val, "/quite/a/long/path/for/a/log/file"); ASSERT_EQ(cf1.read("global", "pid file", val), 0); ASSERT_EQ(val, "spork"); - -#if BOOST_VERSION < 107200 - std::string unicode_config_1f(next_tempfile(unicode_config_1)); - ConfFile cf2; - ASSERT_EQ(cf2.parse_file(unicode_config_1f.c_str(), &err), 0); - ASSERT_EQ(err.tellp(), 0U); - ASSERT_EQ(cf2.read("global", "log file", val), 0); - ASSERT_EQ(val, "\x66\xd1\x86\xd1\x9d\xd3\xad\xd3\xae"); -#endif } TEST(ConfUtils, IllegalFiles) {