Disambiguate between boost::ref and std:ref etc.

Suppress some new warnings from VC-10.
Fix singular iterator logic (fixes VC-10 failures).
Fixes #4114.
Fixes #3632

[SVN r61430]
This commit is contained in:
John Maddock
2010-04-20 16:03:14 +00:00
parent 67f5369cae
commit a2142edcd3
4 changed files with 85 additions and 77 deletions

View File

@ -106,6 +106,14 @@ public:
allocator_architype(); allocator_architype();
allocator_architype(const allocator_architype&); allocator_architype(const allocator_architype&);
#if defined(BOOST_MSVC) && (BOOST_MSVC == 1600)
//
// This doesn't appear to be part of the allocator requirements
// in the std, but is required by std::vector in VC10 :-(
//
template <class Other>
allocator_architype(const allocator_architype<Other>&);
#endif
void construct(pointer, const_reference); void construct(pointer, const_reference);
void destroy(pointer); void destroy(pointer);
@ -990,18 +998,18 @@ struct BoostRegexConcept
out = regex_format(out, m_cresults, func2b); out = regex_format(out, m_cresults, func2b);
out = regex_format(out, m_cresults, func1b, f); out = regex_format(out, m_cresults, func1b, f);
out = regex_format(out, m_cresults, func1b); out = regex_format(out, m_cresults, func1b);
out = regex_format(out, m_cresults, ref(func3b), f); out = regex_format(out, m_cresults, boost::ref(func3b), f);
out = regex_format(out, m_cresults, ref(func3b)); out = regex_format(out, m_cresults, boost::ref(func3b));
out = regex_format(out, m_cresults, ref(func2b), f); out = regex_format(out, m_cresults, boost::ref(func2b), f);
out = regex_format(out, m_cresults, ref(func2b)); out = regex_format(out, m_cresults, boost::ref(func2b));
out = regex_format(out, m_cresults, ref(func1b), f); out = regex_format(out, m_cresults, boost::ref(func1b), f);
out = regex_format(out, m_cresults, ref(func1b)); out = regex_format(out, m_cresults, boost::ref(func1b));
out = regex_format(out, m_cresults, cref(func3b), f); out = regex_format(out, m_cresults, boost::cref(func3b), f);
out = regex_format(out, m_cresults, cref(func3b)); out = regex_format(out, m_cresults, boost::cref(func3b));
out = regex_format(out, m_cresults, cref(func2b), f); out = regex_format(out, m_cresults, boost::cref(func2b), f);
out = regex_format(out, m_cresults, cref(func2b)); out = regex_format(out, m_cresults, boost::cref(func2b));
out = regex_format(out, m_cresults, cref(func1b), f); out = regex_format(out, m_cresults, boost::cref(func1b), f);
out = regex_format(out, m_cresults, cref(func1b)); out = regex_format(out, m_cresults, boost::cref(func1b));
m_string += regex_format(m_cresults, func3b, f); m_string += regex_format(m_cresults, func3b, f);
m_string += regex_format(m_cresults, func3b); m_string += regex_format(m_cresults, func3b);
@ -1009,18 +1017,18 @@ struct BoostRegexConcept
m_string += regex_format(m_cresults, func2b); m_string += regex_format(m_cresults, func2b);
m_string += regex_format(m_cresults, func1b, f); m_string += regex_format(m_cresults, func1b, f);
m_string += regex_format(m_cresults, func1b); m_string += regex_format(m_cresults, func1b);
m_string += regex_format(m_cresults, ref(func3b), f); m_string += regex_format(m_cresults, boost::ref(func3b), f);
m_string += regex_format(m_cresults, ref(func3b)); m_string += regex_format(m_cresults, boost::ref(func3b));
m_string += regex_format(m_cresults, ref(func2b), f); m_string += regex_format(m_cresults, boost::ref(func2b), f);
m_string += regex_format(m_cresults, ref(func2b)); m_string += regex_format(m_cresults, boost::ref(func2b));
m_string += regex_format(m_cresults, ref(func1b), f); m_string += regex_format(m_cresults, boost::ref(func1b), f);
m_string += regex_format(m_cresults, ref(func1b)); m_string += regex_format(m_cresults, boost::ref(func1b));
m_string += regex_format(m_cresults, cref(func3b), f); m_string += regex_format(m_cresults, boost::cref(func3b), f);
m_string += regex_format(m_cresults, cref(func3b)); m_string += regex_format(m_cresults, boost::cref(func3b));
m_string += regex_format(m_cresults, cref(func2b), f); m_string += regex_format(m_cresults, boost::cref(func2b), f);
m_string += regex_format(m_cresults, cref(func2b)); m_string += regex_format(m_cresults, boost::cref(func2b));
m_string += regex_format(m_cresults, cref(func1b), f); m_string += regex_format(m_cresults, boost::cref(func1b), f);
m_string += regex_format(m_cresults, cref(func1b)); m_string += regex_format(m_cresults, boost::cref(func1b));
out = m_cresults.format(out, func3b, f); out = m_cresults.format(out, func3b, f);
out = m_cresults.format(out, func3b); out = m_cresults.format(out, func3b);
@ -1028,18 +1036,18 @@ struct BoostRegexConcept
out = m_cresults.format(out, func2b); out = m_cresults.format(out, func2b);
out = m_cresults.format(out, func1b, f); out = m_cresults.format(out, func1b, f);
out = m_cresults.format(out, func1b); out = m_cresults.format(out, func1b);
out = m_cresults.format(out, ref(func3b), f); out = m_cresults.format(out, boost::ref(func3b), f);
out = m_cresults.format(out, ref(func3b)); out = m_cresults.format(out, boost::ref(func3b));
out = m_cresults.format(out, ref(func2b), f); out = m_cresults.format(out, boost::ref(func2b), f);
out = m_cresults.format(out, ref(func2b)); out = m_cresults.format(out, boost::ref(func2b));
out = m_cresults.format(out, ref(func1b), f); out = m_cresults.format(out, boost::ref(func1b), f);
out = m_cresults.format(out, ref(func1b)); out = m_cresults.format(out, boost::ref(func1b));
out = m_cresults.format(out, cref(func3b), f); out = m_cresults.format(out, boost::cref(func3b), f);
out = m_cresults.format(out, cref(func3b)); out = m_cresults.format(out, boost::cref(func3b));
out = m_cresults.format(out, cref(func2b), f); out = m_cresults.format(out, boost::cref(func2b), f);
out = m_cresults.format(out, cref(func2b)); out = m_cresults.format(out, boost::cref(func2b));
out = m_cresults.format(out, cref(func1b), f); out = m_cresults.format(out, boost::cref(func1b), f);
out = m_cresults.format(out, cref(func1b)); out = m_cresults.format(out, boost::cref(func1b));
m_string += m_cresults.format(func3b, f); m_string += m_cresults.format(func3b, f);
m_string += m_cresults.format(func3b); m_string += m_cresults.format(func3b);
@ -1047,18 +1055,18 @@ struct BoostRegexConcept
m_string += m_cresults.format(func2b); m_string += m_cresults.format(func2b);
m_string += m_cresults.format(func1b, f); m_string += m_cresults.format(func1b, f);
m_string += m_cresults.format(func1b); m_string += m_cresults.format(func1b);
m_string += m_cresults.format(ref(func3b), f); m_string += m_cresults.format(boost::ref(func3b), f);
m_string += m_cresults.format(ref(func3b)); m_string += m_cresults.format(boost::ref(func3b));
m_string += m_cresults.format(ref(func2b), f); m_string += m_cresults.format(boost::ref(func2b), f);
m_string += m_cresults.format(ref(func2b)); m_string += m_cresults.format(boost::ref(func2b));
m_string += m_cresults.format(ref(func1b), f); m_string += m_cresults.format(boost::ref(func1b), f);
m_string += m_cresults.format(ref(func1b)); m_string += m_cresults.format(boost::ref(func1b));
m_string += m_cresults.format(cref(func3b), f); m_string += m_cresults.format(boost::cref(func3b), f);
m_string += m_cresults.format(cref(func3b)); m_string += m_cresults.format(boost::cref(func3b));
m_string += m_cresults.format(cref(func2b), f); m_string += m_cresults.format(boost::cref(func2b), f);
m_string += m_cresults.format(cref(func2b)); m_string += m_cresults.format(boost::cref(func2b));
m_string += m_cresults.format(cref(func1b), f); m_string += m_cresults.format(boost::cref(func1b), f);
m_string += m_cresults.format(cref(func1b)); m_string += m_cresults.format(boost::cref(func1b));
out = regex_replace(out, m_in, m_in, ce, func3, f); out = regex_replace(out, m_in, m_in, ce, func3, f);
out = regex_replace(out, m_in, m_in, ce, func3); out = regex_replace(out, m_in, m_in, ce, func3);
@ -1066,18 +1074,18 @@ struct BoostRegexConcept
out = regex_replace(out, m_in, m_in, ce, func2); out = regex_replace(out, m_in, m_in, ce, func2);
out = regex_replace(out, m_in, m_in, ce, func1, f); out = regex_replace(out, m_in, m_in, ce, func1, f);
out = regex_replace(out, m_in, m_in, ce, func1); out = regex_replace(out, m_in, m_in, ce, func1);
out = regex_replace(out, m_in, m_in, ce, ref(func3), f); out = regex_replace(out, m_in, m_in, ce, boost::ref(func3), f);
out = regex_replace(out, m_in, m_in, ce, ref(func3)); out = regex_replace(out, m_in, m_in, ce, boost::ref(func3));
out = regex_replace(out, m_in, m_in, ce, ref(func2), f); out = regex_replace(out, m_in, m_in, ce, boost::ref(func2), f);
out = regex_replace(out, m_in, m_in, ce, ref(func2)); out = regex_replace(out, m_in, m_in, ce, boost::ref(func2));
out = regex_replace(out, m_in, m_in, ce, ref(func1), f); out = regex_replace(out, m_in, m_in, ce, boost::ref(func1), f);
out = regex_replace(out, m_in, m_in, ce, ref(func1)); out = regex_replace(out, m_in, m_in, ce, boost::ref(func1));
out = regex_replace(out, m_in, m_in, ce, cref(func3), f); out = regex_replace(out, m_in, m_in, ce, boost::cref(func3), f);
out = regex_replace(out, m_in, m_in, ce, cref(func3)); out = regex_replace(out, m_in, m_in, ce, boost::cref(func3));
out = regex_replace(out, m_in, m_in, ce, cref(func2), f); out = regex_replace(out, m_in, m_in, ce, boost::cref(func2), f);
out = regex_replace(out, m_in, m_in, ce, cref(func2)); out = regex_replace(out, m_in, m_in, ce, boost::cref(func2));
out = regex_replace(out, m_in, m_in, ce, cref(func1), f); out = regex_replace(out, m_in, m_in, ce, boost::cref(func1), f);
out = regex_replace(out, m_in, m_in, ce, cref(func1)); out = regex_replace(out, m_in, m_in, ce, boost::cref(func1));
functor3<match_results<typename string_type::const_iterator> > func3s; functor3<match_results<typename string_type::const_iterator> > func3s;
functor2<match_results<typename string_type::const_iterator> > func2s; functor2<match_results<typename string_type::const_iterator> > func2s;
@ -1088,18 +1096,18 @@ struct BoostRegexConcept
m_string += regex_replace(m_string, ce, func2s); m_string += regex_replace(m_string, ce, func2s);
m_string += regex_replace(m_string, ce, func1s, f); m_string += regex_replace(m_string, ce, func1s, f);
m_string += regex_replace(m_string, ce, func1s); m_string += regex_replace(m_string, ce, func1s);
m_string += regex_replace(m_string, ce, ref(func3s), f); m_string += regex_replace(m_string, ce, boost::ref(func3s), f);
m_string += regex_replace(m_string, ce, ref(func3s)); m_string += regex_replace(m_string, ce, boost::ref(func3s));
m_string += regex_replace(m_string, ce, ref(func2s), f); m_string += regex_replace(m_string, ce, boost::ref(func2s), f);
m_string += regex_replace(m_string, ce, ref(func2s)); m_string += regex_replace(m_string, ce, boost::ref(func2s));
m_string += regex_replace(m_string, ce, ref(func1s), f); m_string += regex_replace(m_string, ce, boost::ref(func1s), f);
m_string += regex_replace(m_string, ce, ref(func1s)); m_string += regex_replace(m_string, ce, boost::ref(func1s));
m_string += regex_replace(m_string, ce, cref(func3s), f); m_string += regex_replace(m_string, ce, boost::cref(func3s), f);
m_string += regex_replace(m_string, ce, cref(func3s)); m_string += regex_replace(m_string, ce, boost::cref(func3s));
m_string += regex_replace(m_string, ce, cref(func2s), f); m_string += regex_replace(m_string, ce, boost::cref(func2s), f);
m_string += regex_replace(m_string, ce, cref(func2s)); m_string += regex_replace(m_string, ce, boost::cref(func2s));
m_string += regex_replace(m_string, ce, cref(func1s), f); m_string += regex_replace(m_string, ce, boost::cref(func1s), f);
m_string += regex_replace(m_string, ce, cref(func1s)); m_string += regex_replace(m_string, ce, boost::cref(func1s));
} }
std::basic_ostream<value_type> m_stream; std::basic_ostream<value_type> m_stream;

View File

@ -56,7 +56,7 @@
#ifdef BOOST_MSVC #ifdef BOOST_MSVC
#pragma warning(push) #pragma warning(push)
#pragma warning(disable:4786) #pragma warning(disable:4786 4251)
#endif #endif
namespace boost{ namespace boost{

View File

@ -393,7 +393,6 @@ public:
std::swap(m_subs, that.m_subs); std::swap(m_subs, that.m_subs);
std::swap(m_named_subs, that.m_named_subs); std::swap(m_named_subs, that.m_named_subs);
std::swap(m_last_closed_paren, that.m_last_closed_paren); std::swap(m_last_closed_paren, that.m_last_closed_paren);
std::swap(m_is_singular, that.m_is_singular);
if(m_is_singular) if(m_is_singular)
{ {
if(!that.m_is_singular) if(!that.m_is_singular)
@ -412,6 +411,7 @@ public:
std::swap(m_base, that.m_base); std::swap(m_base, that.m_base);
std::swap(m_null, that.m_null); std::swap(m_null, that.m_null);
} }
std::swap(m_is_singular, that.m_is_singular);
} }
bool operator==(const match_results& that)const bool operator==(const match_results& that)const
{ {

View File

@ -964,7 +964,7 @@ struct format_functor3
template <class OutputIter> template <class OutputIter>
OutputIter operator()(const Match& m, OutputIter i, boost::regex_constants::match_flag_type f) OutputIter operator()(const Match& m, OutputIter i, boost::regex_constants::match_flag_type f)
{ {
return unwrap_ref(func)(m, i, f); return boost::unwrap_ref(func)(m, i, f);
} }
template <class OutputIter, class Traits> template <class OutputIter, class Traits>
OutputIter operator()(const Match& m, OutputIter i, boost::regex_constants::match_flag_type f, const Traits&) OutputIter operator()(const Match& m, OutputIter i, boost::regex_constants::match_flag_type f, const Traits&)
@ -984,7 +984,7 @@ struct format_functor2
template <class OutputIter> template <class OutputIter>
OutputIter operator()(const Match& m, OutputIter i, boost::regex_constants::match_flag_type /*f*/) OutputIter operator()(const Match& m, OutputIter i, boost::regex_constants::match_flag_type /*f*/)
{ {
return unwrap_ref(func)(m, i); return boost::unwrap_ref(func)(m, i);
} }
template <class OutputIter, class Traits> template <class OutputIter, class Traits>
OutputIter operator()(const Match& m, OutputIter i, boost::regex_constants::match_flag_type f, const Traits&) OutputIter operator()(const Match& m, OutputIter i, boost::regex_constants::match_flag_type f, const Traits&)
@ -1021,7 +1021,7 @@ struct format_functor1
template <class OutputIter> template <class OutputIter>
OutputIter operator()(const Match& m, OutputIter i, boost::regex_constants::match_flag_type /*f*/) OutputIter operator()(const Match& m, OutputIter i, boost::regex_constants::match_flag_type /*f*/)
{ {
return do_format_string(unwrap_ref(func)(m), i); return do_format_string(boost::unwrap_ref(func)(m), i);
} }
template <class OutputIter, class Traits> template <class OutputIter, class Traits>
OutputIter operator()(const Match& m, OutputIter i, boost::regex_constants::match_flag_type f, const Traits&) OutputIter operator()(const Match& m, OutputIter i, boost::regex_constants::match_flag_type f, const Traits&)