summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMaxime Coste <mawww@kakoune.org>2017-08-14 11:41:12 +0700
committerMaxime Coste <mawww@kakoune.org>2017-08-14 11:41:12 +0700
commit9329fc99d26fd567ffc13aaaab83237ebec9a8ba (patch)
tree80fd3ae8cc6cf717cb073df504e6b9e108d16bf1 /src
parent6aa2388700fbad7942b96e9711b60abfa0bb7114 (diff)
Style tweak for regex code
Diffstat (limited to 'src')
-rw-r--r--src/regex.hh12
1 files 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<typename It>
bool regex_match(It begin, It end, const Regex& re)
{
- using Utf8It = RegexUtf8It<It>;
try
{
- return boost::regex_match(Utf8It{begin, begin, end}, Utf8It{end, begin, end}, re);
+ return boost::regex_match<RegexUtf8It<It>>({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<typename It>
bool regex_match(It begin, It end, MatchResults<It>& res, const Regex& re)
{
- using Utf8It = RegexUtf8It<It>;
try
{
- return boost::regex_match(Utf8It{begin, begin, end}, Utf8It{end, begin, end}, res, re);
+ return boost::regex_match<RegexUtf8It<It>>({begin, begin, end}, {end, begin, end}, res, re);
}
catch (std::runtime_error& err)
{
@@ -133,10 +131,9 @@ template<typename It>
bool regex_search(It begin, It end, const Regex& re,
RegexConstant::match_flag_type flags = RegexConstant::match_default)
{
- using Utf8It = RegexUtf8It<It>;
try
{
- return boost::regex_search(Utf8It{begin, begin, end}, Utf8It{end, begin, end}, re, flags);
+ return boost::regex_search<RegexUtf8It<It>>({begin, begin, end}, {end, begin, end}, re, flags);
}
catch (std::runtime_error& err)
{
@@ -148,10 +145,9 @@ template<typename It>
bool regex_search(It begin, It end, MatchResults<It>& res, const Regex& re,
RegexConstant::match_flag_type flags = RegexConstant::match_default)
{
- using Utf8It = RegexUtf8It<It>;
try
{
- return boost::regex_search(Utf8It{begin, begin, end}, Utf8It{end, begin, end}, res, re, flags);
+ return boost::regex_search<RegexUtf8It<It>>({begin, begin, end}, {end, begin, end}, res, re, flags);
}
catch (std::runtime_error& err)
{