|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r61430 - in trunk/boost/regex: . v4
From: john_at_[hidden]
Date: 2010-04-20 12:03:16
Author: johnmaddock
Date: 2010-04-20 12:03:14 EDT (Tue, 20 Apr 2010)
New Revision: 61430
URL: http://svn.boost.org/trac/boost/changeset/61430
Log:
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
Text files modified:
trunk/boost/regex/concepts.hpp | 152 +++++++++++++++++++++------------------
trunk/boost/regex/v4/cpp_regex_traits.hpp | 2
trunk/boost/regex/v4/match_results.hpp | 2
trunk/boost/regex/v4/regex_format.hpp | 6
4 files changed, 85 insertions(+), 77 deletions(-)
Modified: trunk/boost/regex/concepts.hpp
==============================================================================
--- trunk/boost/regex/concepts.hpp (original)
+++ trunk/boost/regex/concepts.hpp 2010-04-20 12:03:14 EDT (Tue, 20 Apr 2010)
@@ -106,6 +106,14 @@
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 destroy(pointer);
@@ -990,18 +998,18 @@
out = regex_format(out, m_cresults, func2b);
out = regex_format(out, m_cresults, func1b, f);
out = regex_format(out, m_cresults, func1b);
- out = regex_format(out, m_cresults, ref(func3b), f);
- out = regex_format(out, m_cresults, ref(func3b));
- out = regex_format(out, m_cresults, ref(func2b), f);
- out = regex_format(out, m_cresults, ref(func2b));
- out = regex_format(out, m_cresults, ref(func1b), f);
- out = regex_format(out, m_cresults, ref(func1b));
- out = regex_format(out, m_cresults, cref(func3b), f);
- out = regex_format(out, m_cresults, cref(func3b));
- out = regex_format(out, m_cresults, cref(func2b), f);
- out = regex_format(out, m_cresults, cref(func2b));
- out = regex_format(out, m_cresults, cref(func1b), f);
- out = regex_format(out, m_cresults, cref(func1b));
+ out = regex_format(out, m_cresults, boost::ref(func3b), f);
+ out = regex_format(out, m_cresults, boost::ref(func3b));
+ out = regex_format(out, m_cresults, boost::ref(func2b), f);
+ out = regex_format(out, m_cresults, boost::ref(func2b));
+ out = regex_format(out, m_cresults, boost::ref(func1b), f);
+ out = regex_format(out, m_cresults, boost::ref(func1b));
+ out = regex_format(out, m_cresults, boost::cref(func3b), f);
+ out = regex_format(out, m_cresults, boost::cref(func3b));
+ out = regex_format(out, m_cresults, boost::cref(func2b), f);
+ out = regex_format(out, m_cresults, boost::cref(func2b));
+ out = regex_format(out, m_cresults, boost::cref(func1b), f);
+ out = regex_format(out, m_cresults, boost::cref(func1b));
m_string += regex_format(m_cresults, func3b, f);
m_string += regex_format(m_cresults, func3b);
@@ -1009,18 +1017,18 @@
m_string += regex_format(m_cresults, func2b);
m_string += regex_format(m_cresults, func1b, f);
m_string += regex_format(m_cresults, func1b);
- m_string += regex_format(m_cresults, ref(func3b), f);
- m_string += regex_format(m_cresults, ref(func3b));
- m_string += regex_format(m_cresults, ref(func2b), f);
- m_string += regex_format(m_cresults, ref(func2b));
- m_string += regex_format(m_cresults, ref(func1b), f);
- m_string += regex_format(m_cresults, ref(func1b));
- m_string += regex_format(m_cresults, cref(func3b), f);
- m_string += regex_format(m_cresults, cref(func3b));
- m_string += regex_format(m_cresults, cref(func2b), f);
- m_string += regex_format(m_cresults, cref(func2b));
- m_string += regex_format(m_cresults, cref(func1b), f);
- m_string += regex_format(m_cresults, cref(func1b));
+ m_string += regex_format(m_cresults, boost::ref(func3b), f);
+ m_string += regex_format(m_cresults, boost::ref(func3b));
+ m_string += regex_format(m_cresults, boost::ref(func2b), f);
+ m_string += regex_format(m_cresults, boost::ref(func2b));
+ m_string += regex_format(m_cresults, boost::ref(func1b), f);
+ m_string += regex_format(m_cresults, boost::ref(func1b));
+ m_string += regex_format(m_cresults, boost::cref(func3b), f);
+ m_string += regex_format(m_cresults, boost::cref(func3b));
+ m_string += regex_format(m_cresults, boost::cref(func2b), f);
+ m_string += regex_format(m_cresults, boost::cref(func2b));
+ m_string += regex_format(m_cresults, boost::cref(func1b), f);
+ m_string += regex_format(m_cresults, boost::cref(func1b));
out = m_cresults.format(out, func3b, f);
out = m_cresults.format(out, func3b);
@@ -1028,18 +1036,18 @@
out = m_cresults.format(out, func2b);
out = m_cresults.format(out, func1b, f);
out = m_cresults.format(out, func1b);
- out = m_cresults.format(out, ref(func3b), f);
- out = m_cresults.format(out, ref(func3b));
- out = m_cresults.format(out, ref(func2b), f);
- out = m_cresults.format(out, ref(func2b));
- out = m_cresults.format(out, ref(func1b), f);
- out = m_cresults.format(out, ref(func1b));
- out = m_cresults.format(out, cref(func3b), f);
- out = m_cresults.format(out, cref(func3b));
- out = m_cresults.format(out, cref(func2b), f);
- out = m_cresults.format(out, cref(func2b));
- out = m_cresults.format(out, cref(func1b), f);
- out = m_cresults.format(out, cref(func1b));
+ out = m_cresults.format(out, boost::ref(func3b), f);
+ out = m_cresults.format(out, boost::ref(func3b));
+ out = m_cresults.format(out, boost::ref(func2b), f);
+ out = m_cresults.format(out, boost::ref(func2b));
+ out = m_cresults.format(out, boost::ref(func1b), f);
+ out = m_cresults.format(out, boost::ref(func1b));
+ out = m_cresults.format(out, boost::cref(func3b), f);
+ out = m_cresults.format(out, boost::cref(func3b));
+ out = m_cresults.format(out, boost::cref(func2b), f);
+ out = m_cresults.format(out, boost::cref(func2b));
+ out = m_cresults.format(out, boost::cref(func1b), f);
+ out = m_cresults.format(out, boost::cref(func1b));
m_string += m_cresults.format(func3b, f);
m_string += m_cresults.format(func3b);
@@ -1047,18 +1055,18 @@
m_string += m_cresults.format(func2b);
m_string += m_cresults.format(func1b, f);
m_string += m_cresults.format(func1b);
- m_string += m_cresults.format(ref(func3b), f);
- m_string += m_cresults.format(ref(func3b));
- m_string += m_cresults.format(ref(func2b), f);
- m_string += m_cresults.format(ref(func2b));
- m_string += m_cresults.format(ref(func1b), f);
- m_string += m_cresults.format(ref(func1b));
- m_string += m_cresults.format(cref(func3b), f);
- m_string += m_cresults.format(cref(func3b));
- m_string += m_cresults.format(cref(func2b), f);
- m_string += m_cresults.format(cref(func2b));
- m_string += m_cresults.format(cref(func1b), f);
- m_string += m_cresults.format(cref(func1b));
+ m_string += m_cresults.format(boost::ref(func3b), f);
+ m_string += m_cresults.format(boost::ref(func3b));
+ m_string += m_cresults.format(boost::ref(func2b), f);
+ m_string += m_cresults.format(boost::ref(func2b));
+ m_string += m_cresults.format(boost::ref(func1b), f);
+ m_string += m_cresults.format(boost::ref(func1b));
+ m_string += m_cresults.format(boost::cref(func3b), f);
+ m_string += m_cresults.format(boost::cref(func3b));
+ m_string += m_cresults.format(boost::cref(func2b), f);
+ m_string += m_cresults.format(boost::cref(func2b));
+ m_string += m_cresults.format(boost::cref(func1b), f);
+ 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);
@@ -1066,18 +1074,18 @@
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);
- out = regex_replace(out, m_in, m_in, ce, ref(func3), f);
- out = regex_replace(out, m_in, m_in, ce, ref(func3));
- out = regex_replace(out, m_in, m_in, ce, ref(func2), f);
- out = regex_replace(out, m_in, m_in, ce, ref(func2));
- out = regex_replace(out, m_in, m_in, ce, ref(func1), f);
- out = regex_replace(out, m_in, m_in, ce, ref(func1));
- out = regex_replace(out, m_in, m_in, ce, cref(func3), f);
- out = regex_replace(out, m_in, m_in, ce, cref(func3));
- out = regex_replace(out, m_in, m_in, ce, cref(func2), f);
- out = regex_replace(out, m_in, m_in, ce, cref(func2));
- out = regex_replace(out, m_in, m_in, ce, cref(func1), f);
- out = regex_replace(out, m_in, m_in, ce, cref(func1));
+ out = regex_replace(out, m_in, m_in, ce, boost::ref(func3), f);
+ out = regex_replace(out, m_in, m_in, ce, boost::ref(func3));
+ out = regex_replace(out, m_in, m_in, ce, boost::ref(func2), f);
+ out = regex_replace(out, m_in, m_in, ce, boost::ref(func2));
+ out = regex_replace(out, m_in, m_in, ce, boost::ref(func1), f);
+ out = regex_replace(out, m_in, m_in, ce, boost::ref(func1));
+ out = regex_replace(out, m_in, m_in, ce, boost::cref(func3), f);
+ out = regex_replace(out, m_in, m_in, ce, boost::cref(func3));
+ out = regex_replace(out, m_in, m_in, ce, boost::cref(func2), f);
+ out = regex_replace(out, m_in, m_in, ce, boost::cref(func2));
+ out = regex_replace(out, m_in, m_in, ce, boost::cref(func1), f);
+ out = regex_replace(out, m_in, m_in, ce, boost::cref(func1));
functor3<match_results<typename string_type::const_iterator> > func3s;
functor2<match_results<typename string_type::const_iterator> > func2s;
@@ -1088,18 +1096,18 @@
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);
- m_string += regex_replace(m_string, ce, ref(func3s), f);
- m_string += regex_replace(m_string, ce, ref(func3s));
- m_string += regex_replace(m_string, ce, ref(func2s), f);
- m_string += regex_replace(m_string, ce, ref(func2s));
- m_string += regex_replace(m_string, ce, ref(func1s), f);
- m_string += regex_replace(m_string, ce, ref(func1s));
- m_string += regex_replace(m_string, ce, cref(func3s), f);
- m_string += regex_replace(m_string, ce, cref(func3s));
- m_string += regex_replace(m_string, ce, cref(func2s), f);
- m_string += regex_replace(m_string, ce, cref(func2s));
- m_string += regex_replace(m_string, ce, cref(func1s), f);
- m_string += regex_replace(m_string, ce, cref(func1s));
+ m_string += regex_replace(m_string, ce, boost::ref(func3s), f);
+ m_string += regex_replace(m_string, ce, boost::ref(func3s));
+ m_string += regex_replace(m_string, ce, boost::ref(func2s), f);
+ m_string += regex_replace(m_string, ce, boost::ref(func2s));
+ m_string += regex_replace(m_string, ce, boost::ref(func1s), f);
+ m_string += regex_replace(m_string, ce, boost::ref(func1s));
+ m_string += regex_replace(m_string, ce, boost::cref(func3s), f);
+ m_string += regex_replace(m_string, ce, boost::cref(func3s));
+ m_string += regex_replace(m_string, ce, boost::cref(func2s), f);
+ m_string += regex_replace(m_string, ce, boost::cref(func2s));
+ m_string += regex_replace(m_string, ce, boost::cref(func1s), f);
+ m_string += regex_replace(m_string, ce, boost::cref(func1s));
}
std::basic_ostream<value_type> m_stream;
Modified: trunk/boost/regex/v4/cpp_regex_traits.hpp
==============================================================================
--- trunk/boost/regex/v4/cpp_regex_traits.hpp (original)
+++ trunk/boost/regex/v4/cpp_regex_traits.hpp 2010-04-20 12:03:14 EDT (Tue, 20 Apr 2010)
@@ -56,7 +56,7 @@
#ifdef BOOST_MSVC
#pragma warning(push)
-#pragma warning(disable:4786)
+#pragma warning(disable:4786 4251)
#endif
namespace boost{
Modified: trunk/boost/regex/v4/match_results.hpp
==============================================================================
--- trunk/boost/regex/v4/match_results.hpp (original)
+++ trunk/boost/regex/v4/match_results.hpp 2010-04-20 12:03:14 EDT (Tue, 20 Apr 2010)
@@ -393,7 +393,6 @@
std::swap(m_subs, that.m_subs);
std::swap(m_named_subs, that.m_named_subs);
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(!that.m_is_singular)
@@ -412,6 +411,7 @@
std::swap(m_base, that.m_base);
std::swap(m_null, that.m_null);
}
+ std::swap(m_is_singular, that.m_is_singular);
}
bool operator==(const match_results& that)const
{
Modified: trunk/boost/regex/v4/regex_format.hpp
==============================================================================
--- trunk/boost/regex/v4/regex_format.hpp (original)
+++ trunk/boost/regex/v4/regex_format.hpp 2010-04-20 12:03:14 EDT (Tue, 20 Apr 2010)
@@ -964,7 +964,7 @@
template <class OutputIter>
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>
OutputIter operator()(const Match& m, OutputIter i, boost::regex_constants::match_flag_type f, const Traits&)
@@ -984,7 +984,7 @@
template <class OutputIter>
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>
OutputIter operator()(const Match& m, OutputIter i, boost::regex_constants::match_flag_type f, const Traits&)
@@ -1021,7 +1021,7 @@
template <class OutputIter>
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>
OutputIter operator()(const Match& m, OutputIter i, boost::regex_constants::match_flag_type f, const Traits&)
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk