Skip to content

Commit 80e4cec

Browse files
committed
log: drop specialization of boost::lexical_cast for log_level
log.hh contains a declaration of a specializtion of lexical_cast for log_level, noting boost doesn't pick up operator<< for log_level, but everything seems to work without the specialization. Dropping it means we can drop yet another boost dependency in a commonly used header file, one that pulls in much of the boost.ranges core.
1 parent 72c7ac5 commit 80e4cec

File tree

2 files changed

+0
-21
lines changed

2 files changed

+0
-21
lines changed

include/seastar/util/log.hh

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@
3535
#include <atomic>
3636
#include <mutex>
3737
#include <type_traits>
38-
#include <boost/lexical_cast.hpp>
3938
#include <fmt/core.h>
4039
#include <fmt/format.h>
4140
#endif
@@ -72,14 +71,6 @@ struct fmt::formatter<seastar::log_level> {
7271
auto format(seastar::log_level level, fmt::format_context& ctx) const -> decltype(ctx.out());
7372
};
7473

75-
// Boost doesn't auto-deduce the existence of the streaming operators for some reason
76-
77-
namespace boost {
78-
template<>
79-
seastar::log_level lexical_cast(const std::string& source);
80-
81-
}
82-
8374
namespace seastar {
8475
SEASTAR_MODULE_EXPORT_BEGIN
8576
class logger;

src/util/log.cc

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -630,18 +630,6 @@ logging_settings extract_settings(const options& opts) {
630630

631631
}
632632

633-
}
634-
namespace boost {
635-
template<>
636-
seastar::log_level lexical_cast(const std::string& source) {
637-
std::istringstream in(source);
638-
seastar::log_level level;
639-
if (!(in >> level)) {
640-
throw boost::bad_lexical_cast();
641-
}
642-
return level;
643-
}
644-
645633
}
646634

647635
namespace std {

0 commit comments

Comments
 (0)