]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/regex/performance/std.cpp
1 ///////////////////////////////////////////////////////////////
2 // Copyright 2015 John Maddock. Distributed under the Boost
3 // Software License, Version 1.0. (See accompanying file
4 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_
7 #include <boost/config.hpp>
9 #ifndef BOOST_NO_CXX11_HDR_REGEX
11 #include "performance.hpp"
14 struct std_regex
: public abstract_regex
20 virtual bool set_expression(const char* pe
, bool isperl
)
24 e
.assign(pe
, isperl
? std::regex::ECMAScript
: std::regex::extended
);
26 catch(const std::exception
&)
32 virtual bool match_test(const char* text
);
33 virtual unsigned find_all(const char* text
);
34 virtual std::string
name();
40 std_regex::register_instance(boost::shared_ptr
<abstract_regex
>(new std_regex
));
42 void do_nothing()const {}
44 static const initializer init
;
47 const std_regex::initializer
std_regex::init
;
50 bool std_regex::match_test(const char * text
)
52 return regex_match(text
, what
, e
);
55 unsigned std_regex::find_all(const char * text
)
57 std::regex_iterator
<const char*> i(text
, text
+ std::strlen(text
), e
), j
;
67 std::string
std_regex::name()