#ifndef BOOST_NO_SFINAE
#include <boost/mpl/has_xxx.hpp>
#endif
+#include <boost/ref.hpp>
namespace boost{
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;
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))
{
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))
// 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;
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&)
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&)
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&)