]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: s/boost::regex/std::regex/
authorKefu Chai <kchai@redhat.com>
Fri, 8 Dec 2017 06:07:52 +0000 (14:07 +0800)
committerKefu Chai <kchai@redhat.com>
Tue, 9 Jan 2018 09:29:08 +0000 (17:29 +0800)
Signed-off-by: Kefu Chai <kchai@redhat.com>
src/rgw/rgw_sync_trace.cc

index d4298f691eebe54d88aca5a20c97ca8726668fd1..5f62c283d46cc8e056f431e29b903c92fbaaa681 100644 (file)
@@ -1,7 +1,7 @@
 #ifndef CEPH_RGW_SYNC_TRACE_H
 #define CEPH_RGW_SYNC_TRACE_H
 
-#include <boost/regex.hpp>
+#include <regex>
 
 #include "common/debug.h"
 #include "common/ceph_json.h"
@@ -92,8 +92,8 @@ RGWSyncTraceNodeRef RGWSyncTraceManager::add_node(RGWSyncTraceNode *node)
 bool RGWSyncTraceNode::match(const string& search_term, bool search_history)
 {
   try {
-    boost::regex expr(search_term);
-    boost::smatch m;
+    std::regex expr(search_term);
+    std::smatch m;
 
     if (regex_search(prefix, m, expr)) {
       return true;
@@ -110,10 +110,8 @@ bool RGWSyncTraceNode::match(const string& search_term, bool search_history)
         return true;
       }
     }
-  } catch (boost::bad_expression const& e) {
+  } catch (const std::regex_error& e) {
     ldout(cct, 5) << "NOTICE: sync trace: bad expression: bad regex search term" << dendl;
-  } catch (...) {
-    ldout(cct, 5) << "NOTICE: sync trace: regex_search() threw exception" << dendl;
   }
 
   return false;