diff --git a/src/regex.hh b/src/regex.hh index 8e6c2dac..58f71270 100644 --- a/src/regex.hh +++ b/src/regex.hh @@ -47,7 +47,7 @@ struct MatchResults struct iterator : std::iterator { - using It = typename Vector::const_iterator; + using It = typename Vector::const_iterator; iterator() = default; iterator(It it) : m_it{std::move(it)} {} @@ -64,7 +64,7 @@ struct MatchResults }; MatchResults() = default; - MatchResults(Vector values) : m_values{std::move(values)} {} + MatchResults(Vector values) : m_values{std::move(values)} {} iterator begin() const { return iterator{m_values.begin()}; } iterator cbegin() const { return iterator{m_values.cbegin()}; } @@ -96,7 +96,7 @@ struct MatchResults } private: - Vector m_values; + Vector m_values; }; inline RegexExecFlags match_flags(bool bol, bool eol, bool bow, bool eow) @@ -116,7 +116,7 @@ bool regex_match(It begin, It end, const Regex& re) template bool regex_match(It begin, It end, MatchResults& res, const Regex& re) { - Vector captures; + Vector captures; const bool matched = regex_match(begin, end, captures, *re.impl()); res = matched ? MatchResults{std::move(captures)} : MatchResults{}; return matched; @@ -133,7 +133,7 @@ template bool regex_search(It begin, It end, MatchResults& res, const Regex& re, RegexExecFlags flags = RegexExecFlags::None) { - Vector captures; + Vector captures; const bool matched = regex_search(begin, end, captures, *re.impl(), flags); res = matched ? MatchResults{std::move(captures)} : MatchResults{}; return matched; diff --git a/src/regex_impl.hh b/src/regex_impl.hh index 358fc9bb..74294f4c 100644 --- a/src/regex_impl.hh +++ b/src/regex_impl.hh @@ -517,7 +517,7 @@ bool regex_match(It begin, It end, const CompiledRegex& re, RegexExecFlags flags } template -bool regex_match(It begin, It end, Vector& captures, const CompiledRegex& re, +bool regex_match(It begin, It end, Vector& captures, const CompiledRegex& re, RegexExecFlags flags = RegexExecFlags::None) { ThreadedRegexVM vm{re}; @@ -538,7 +538,7 @@ bool regex_search(It begin, It end, const CompiledRegex& re, } template -bool regex_search(It begin, It end, Vector& captures, const CompiledRegex& re, +bool regex_search(It begin, It end, Vector& captures, const CompiledRegex& re, RegexExecFlags flags = RegexExecFlags::None) { ThreadedRegexVM vm{re};