mirror of
https://github.com/boostorg/regex.git
synced 2025-07-19 07:12:07 +02:00
Merged accumulated patches from Trunk.
[SVN r62831]
This commit is contained in:
@ -34,6 +34,7 @@
|
||||
#ifndef BOOST_NO_SFINAE
|
||||
#include <boost/mpl/has_xxx.hpp>
|
||||
#endif
|
||||
#include <boost/ref.hpp>
|
||||
|
||||
namespace boost{
|
||||
|
||||
@ -334,7 +335,7 @@ void basic_regex_formatter<OutputIterator, Results, traits, ForwardIter>::format
|
||||
m_position = --base;
|
||||
}
|
||||
}
|
||||
put((this->m_results)[this->m_results.size() > 1 ? this->m_results.size() - 1 : 1]);
|
||||
put((this->m_results)[this->m_results.size() > 1 ? static_cast<int>(this->m_results.size() - 1) : 1]);
|
||||
break;
|
||||
case '{':
|
||||
have_brace = true;
|
||||
@ -384,7 +385,7 @@ bool basic_regex_formatter<OutputIterator, Results, traits, ForwardIter>::handle
|
||||
if(have_brace && (*m_position == '^'))
|
||||
++m_position;
|
||||
|
||||
int max_len = m_end - m_position;
|
||||
std::ptrdiff_t max_len = m_end - m_position;
|
||||
|
||||
if((max_len >= 5) && std::equal(m_position, m_position + 5, MATCH))
|
||||
{
|
||||
@ -447,7 +448,7 @@ bool basic_regex_formatter<OutputIterator, Results, traits, ForwardIter>::handle
|
||||
return false;
|
||||
}
|
||||
}
|
||||
put((this->m_results)[this->m_results.size() > 1 ? this->m_results.size() - 1 : 1]);
|
||||
put((this->m_results)[this->m_results.size() > 1 ? static_cast<int>(this->m_results.size() - 1) : 1]);
|
||||
return true;
|
||||
}
|
||||
if((max_len >= 20) && std::equal(m_position, m_position + 20, LAST_SUBMATCH_RESULT))
|
||||
@ -895,7 +896,7 @@ private:
|
||||
// F must be a pointer, a function, or a class with a function call operator:
|
||||
//
|
||||
BOOST_STATIC_ASSERT((::boost::is_pointer<F>::value || ::boost::is_function<F>::value || ::boost::is_class<F>::value));
|
||||
static formatter_wrapper<F> f;
|
||||
static formatter_wrapper<typename unwrap_reference<F>::type> f;
|
||||
static M m;
|
||||
static O out;
|
||||
static boost::regex_constants::match_flag_type flags;
|
||||
@ -963,7 +964,7 @@ struct format_functor3
|
||||
template <class OutputIter>
|
||||
OutputIter operator()(const Match& m, OutputIter i, boost::regex_constants::match_flag_type f)
|
||||
{
|
||||
return func(m, i, f);
|
||||
return boost::unwrap_ref(func)(m, i, f);
|
||||
}
|
||||
template <class OutputIter, class Traits>
|
||||
OutputIter operator()(const Match& m, OutputIter i, boost::regex_constants::match_flag_type f, const Traits&)
|
||||
@ -983,7 +984,7 @@ struct format_functor2
|
||||
template <class OutputIter>
|
||||
OutputIter operator()(const Match& m, OutputIter i, boost::regex_constants::match_flag_type /*f*/)
|
||||
{
|
||||
return func(m, i);
|
||||
return boost::unwrap_ref(func)(m, i);
|
||||
}
|
||||
template <class OutputIter, class Traits>
|
||||
OutputIter operator()(const Match& m, OutputIter i, boost::regex_constants::match_flag_type f, const Traits&)
|
||||
@ -1020,7 +1021,7 @@ struct format_functor1
|
||||
template <class OutputIter>
|
||||
OutputIter operator()(const Match& m, OutputIter i, boost::regex_constants::match_flag_type /*f*/)
|
||||
{
|
||||
return do_format_string(func(m), i);
|
||||
return do_format_string(boost::unwrap_ref(func)(m), i);
|
||||
}
|
||||
template <class OutputIter, class Traits>
|
||||
OutputIter operator()(const Match& m, OutputIter i, boost::regex_constants::match_flag_type f, const Traits&)
|
||||
|
Reference in New Issue
Block a user