Replaced boost::regex with std::regex.
This commit is contained in:
parent
b2ba4ee34c
commit
8acd51fc62
1 changed files with 3 additions and 5 deletions
|
@ -2,6 +2,7 @@
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
#include <ctime>
|
#include <ctime>
|
||||||
#include <iomanip>
|
#include <iomanip>
|
||||||
|
#include <regex>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
#include <stdlib.h> // provides **_environ
|
#include <stdlib.h> // provides **_environ
|
||||||
|
@ -22,9 +23,6 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <boost/algorithm/string.hpp>
|
#include <boost/algorithm/string.hpp>
|
||||||
#include <boost/regex.hpp>
|
|
||||||
// Unicode iterator to iterate over utf8.
|
|
||||||
#include <boost/regex/pending/unicode_iterator.hpp>
|
|
||||||
|
|
||||||
// Spirit v2.5 allows you to suppress automatic generation
|
// Spirit v2.5 allows you to suppress automatic generation
|
||||||
// of predefined terminals to speed up complation. With
|
// of predefined terminals to speed up complation. With
|
||||||
|
@ -426,13 +424,13 @@ namespace client
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
std::string pattern(++ rhs.begin(), -- rhs.end());
|
std::string pattern(++ rhs.begin(), -- rhs.end());
|
||||||
bool result = boost::regex_match(*subject, boost::regex(pattern));
|
bool result = std::regex_match(*subject, std::regex(pattern));
|
||||||
if (op == '!')
|
if (op == '!')
|
||||||
result = ! result;
|
result = ! result;
|
||||||
lhs.reset();
|
lhs.reset();
|
||||||
lhs.type = TYPE_BOOL;
|
lhs.type = TYPE_BOOL;
|
||||||
lhs.data.b = result;
|
lhs.data.b = result;
|
||||||
} catch (boost::regex_error &ex) {
|
} catch (std::regex_error &ex) {
|
||||||
// Syntax error in the regular expression
|
// Syntax error in the regular expression
|
||||||
boost::throw_exception(qi::expectation_failure<Iterator>(
|
boost::throw_exception(qi::expectation_failure<Iterator>(
|
||||||
rhs.begin(), rhs.end(), spirit::info(std::string("*Regular expression compilation failed: ") + ex.what())));
|
rhs.begin(), rhs.end(), spirit::info(std::string("*Regular expression compilation failed: ") + ex.what())));
|
||||||
|
|
Loading…
Reference in a new issue