From 9329fc99d26fd567ffc13aaaab83237ebec9a8ba Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Mon, 14 Aug 2017 11:41:12 +0700 Subject: [PATCH] Style tweak for regex code --- src/regex.hh | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/regex.hh b/src/regex.hh index ad435b6f..a76990b0 100644 --- a/src/regex.hh +++ b/src/regex.hh @@ -104,10 +104,9 @@ inline RegexConstant::match_flag_type match_flags(bool bol, bool eol, bool bow, template bool regex_match(It begin, It end, const Regex& re) { - using Utf8It = RegexUtf8It; try { - return boost::regex_match(Utf8It{begin, begin, end}, Utf8It{end, begin, end}, re); + return boost::regex_match>({begin, begin, end}, {end, begin, end}, re); } catch (std::runtime_error& err) { @@ -118,10 +117,9 @@ bool regex_match(It begin, It end, const Regex& re) template bool regex_match(It begin, It end, MatchResults& res, const Regex& re) { - using Utf8It = RegexUtf8It; try { - return boost::regex_match(Utf8It{begin, begin, end}, Utf8It{end, begin, end}, res, re); + return boost::regex_match>({begin, begin, end}, {end, begin, end}, res, re); } catch (std::runtime_error& err) { @@ -133,10 +131,9 @@ template bool regex_search(It begin, It end, const Regex& re, RegexConstant::match_flag_type flags = RegexConstant::match_default) { - using Utf8It = RegexUtf8It; try { - return boost::regex_search(Utf8It{begin, begin, end}, Utf8It{end, begin, end}, re, flags); + return boost::regex_search>({begin, begin, end}, {end, begin, end}, re, flags); } catch (std::runtime_error& err) { @@ -148,10 +145,9 @@ template bool regex_search(It begin, It end, MatchResults& res, const Regex& re, RegexConstant::match_flag_type flags = RegexConstant::match_default) { - using Utf8It = RegexUtf8It; try { - return boost::regex_search(Utf8It{begin, begin, end}, Utf8It{end, begin, end}, res, re, flags); + return boost::regex_search>({begin, begin, end}, {end, begin, end}, res, re, flags); } catch (std::runtime_error& err) {