diff --git a/include/boost/regex/detail/regex_compile.hpp b/include/boost/regex/detail/regex_compile.hpp index b88fbd31..f13028a0 100644 --- a/include/boost/regex/detail/regex_compile.hpp +++ b/include/boost/regex/detail/regex_compile.hpp @@ -636,6 +636,7 @@ void BOOST_REGEX_CALL reg_expression::move_offsets(re_ template re_detail::re_syntax_base* BOOST_REGEX_CALL reg_expression::compile_set_simple(re_detail::re_syntax_base* dat, unsigned long cls, bool isnot) { + typedef typename re_detail::is_byte::width_type width_type; re_detail::jstack singles(64, data.allocator()); re_detail::jstack ranges(64, data.allocator()); re_detail::jstack classes(64, data.allocator()); @@ -646,7 +647,7 @@ re_detail::re_syntax_base* BOOST_REGEX_CALL reg_expressionnext.i = data.size(); } - return compile_set_aux(singles, ranges, classes, equivalents, isnot, re_detail::is_byte::width_type()); + return compile_set_aux(singles, ranges, classes, equivalents, isnot, width_type()); } template @@ -953,11 +954,13 @@ re_detail::re_syntax_base* BOOST_REGEX_CALL reg_expression::width_type width_type; + re_detail::re_syntax_base* result; if(has_digraphs) result = compile_set_aux(singles, ranges, classes, equivalents, isnot, re_detail::_wide_type()); else - result = compile_set_aux(singles, ranges, classes, equivalents, isnot, re_detail::is_byte::width_type()); + result = compile_set_aux(singles, ranges, classes, equivalents, isnot, width_type()); #ifdef __BORLANDC__ // delayed throw: if((result == 0) && (_flags & regbase::use_except)) diff --git a/include/boost/regex/detail/regex_format.hpp b/include/boost/regex/detail/regex_format.hpp index 314c4f4b..bb225b22 100644 --- a/include/boost/regex/detail/regex_format.hpp +++ b/include/boost/regex/detail/regex_format.hpp @@ -140,9 +140,9 @@ namespace{ // is sent to an OutputIterator, // _reg_format_aux does the actual work: // -template +template OutputIterator BOOST_REGEX_CALL _reg_format_aux(OutputIterator out, - const match_results& m, + const match_results& m, const charT*& fmt, unsigned flags, const traits_type& traits_inst) { @@ -175,25 +175,25 @@ OutputIterator BOOST_REGEX_CALL _reg_format_aux(OutputIterator out, switch(traits_inst.syntax_type((traits_size_type)(traits_uchar_type)(*fmt))) { case traits_type::syntax_start_buffer: - oi_assign(&out, re_copy_out(out, iterator(m[-1].first), iterator(m[-1].second))); + oi_assign(&out, re_copy_out(out, Iterator(m[-1].first), Iterator(m[-1].second))); ++fmt; continue; case traits_type::syntax_end_buffer: - oi_assign(&out, re_copy_out(out, iterator(m[-2].first), iterator(m[-2].second))); + oi_assign(&out, re_copy_out(out, Iterator(m[-2].first), Iterator(m[-2].second))); ++fmt; continue; case traits_type::syntax_digit: { expand_sub: unsigned int index = traits_inst.toi(fmt, fmt_end, 10); - oi_assign(&out, re_copy_out(out, iterator(m[index].first), iterator(m[index].second))); + oi_assign(&out, re_copy_out(out, Iterator(m[index].first), Iterator(m[index].second))); continue; } } // anything else: if(*fmt == '&') { - oi_assign(&out, re_copy_out(out, iterator(m[0].first), iterator(m[0].second))); + oi_assign(&out, re_copy_out(out, Iterator(m[0].first), Iterator(m[0].second))); ++fmt; } else @@ -415,7 +415,7 @@ expand_sub: default_opt: if((flags & format_sed) && (*fmt == '&')) { - oi_assign(&out, re_copy_out(out, iterator(m[0].first), iterator(m[0].second))); + oi_assign(&out, re_copy_out(out, Iterator(m[0].first), Iterator(m[0].second))); ++fmt; continue; } @@ -448,25 +448,25 @@ public: } }; -template +template class merge_out_predicate { OutputIterator* out; - iterator* last; + Iterator* last; const charT* fmt; unsigned flags; const traits_type* pt; public: - merge_out_predicate(OutputIterator& o, iterator& pi, const charT* f, unsigned format_flags, const traits_type& p) + merge_out_predicate(OutputIterator& o, Iterator& pi, const charT* f, unsigned format_flags, const traits_type& p) : out(&o), last(&pi), fmt(f), flags(format_flags), pt(&p){} ~merge_out_predicate() {} - bool BOOST_REGEX_CALL operator()(const boost::match_results& m) + bool BOOST_REGEX_CALL operator()(const boost::match_results& m) { const charT* f = fmt; if(0 == (flags & format_no_copy)) - oi_assign(out, re_copy_out(*out, iterator(m[-1].first), iterator(m[-1].second))); + oi_assign(out, re_copy_out(*out, Iterator(m[-1].first), Iterator(m[-1].second))); oi_assign(out, _reg_format_aux(*out, m, f, flags, *pt)); *last = m[-2].first; return flags & format_first_only ? false : true; @@ -475,9 +475,9 @@ public: } // namespace re_detail -template +template OutputIterator regex_format(OutputIterator out, - const match_results& m, + const match_results& m, const charT* fmt, unsigned flags = 0 ) @@ -486,9 +486,9 @@ OutputIterator regex_format(OutputIterator out, return re_detail::_reg_format_aux(out, m, fmt, flags, t); } -template +template OutputIterator regex_format(OutputIterator out, - const match_results& m, + const match_results& m, const std::basic_string& fmt, unsigned flags = 0 ) @@ -498,8 +498,8 @@ OutputIterator regex_format(OutputIterator out, return re_detail::_reg_format_aux(out, m, start, flags, t); } -template -std::basic_string regex_format(const match_results& m, const charT* fmt, unsigned flags = 0) +template +std::basic_string regex_format(const match_results& m, const charT* fmt, unsigned flags = 0) { std::basic_string result; re_detail::string_out_iterator > i(result); @@ -507,8 +507,8 @@ std::basic_string regex_format(const match_results& return result; } -template -std::basic_string regex_format(const match_results& m, const std::basic_string& fmt, unsigned flags = 0) +template +std::basic_string regex_format(const match_results& m, const std::basic_string& fmt, unsigned flags = 0) { std::basic_string result; re_detail::string_out_iterator > i(result); @@ -516,24 +516,24 @@ std::basic_string regex_format(const match_results& return result; } -template +template OutputIterator regex_merge(OutputIterator out, - iterator first, - iterator last, + Iterator first, + Iterator last, const reg_expression& e, const charT* fmt, unsigned int flags = match_default) { - iterator l = first; - re_detail::merge_out_predicate oi(out, l, fmt, flags, e.get_traits()); + Iterator l = first; + re_detail::merge_out_predicate oi(out, l, fmt, flags, e.get_traits()); regex_grep(oi, first, last, e, flags); return (flags & format_no_copy) ? out : re_detail::re_copy_out(out, l, last); } -template +template inline OutputIterator regex_merge(OutputIterator out, - iterator first, - iterator last, + Iterator first, + Iterator last, const reg_expression& e, const std::basic_string& fmt, unsigned int flags = match_default)