From b662f3cd817f78a112eccce754d556947461b16b Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Fri, 8 Dec 2017 13:52:08 +0800 Subject: [PATCH] common: s/boost::regex/std::regex/ Signed-off-by: Kefu Chai --- src/common/address_helper.cc | 11 ++++------- src/common/options.cc | 10 +++++----- 2 files changed, 9 insertions(+), 12 deletions(-) diff --git a/src/common/address_helper.cc b/src/common/address_helper.cc index 7ea9701e142..8774892211d 100644 --- a/src/common/address_helper.cc +++ b/src/common/address_helper.cc @@ -8,20 +8,17 @@ */ #include +#include #include "common/address_helper.h" -#include "boost/regex.hpp" - // decode strings like "tcp://:" int entity_addr_from_url(entity_addr_t *addr /* out */, const char *url) { - using namespace boost; - - regex expr("(tcp|rdma)://([^:]*):([\\d]+)"); - cmatch m; + std::regex expr("(tcp|rdma)://([^:]*):([\\d]+)"); + std::cmatch m; - if (regex_match(url, m, expr)) { + if (std::regex_match(url, m, expr)) { string host(m[2].first, m[2].second); string port(m[3].first, m[3].second); addrinfo hints; diff --git a/src/common/options.cc b/src/common/options.cc index 19e88a10f0a..fedbf9c75b6 100644 --- a/src/common/options.cc +++ b/src/common/options.cc @@ -9,7 +9,7 @@ #include "include/stringify.h" #include #include -#include +#include // Definitions for enums #include "common/perf_counters.h" @@ -5681,8 +5681,8 @@ static std::vector