|
Boost-Commit : |
From: eric_at_[hidden]
Date: 2008-03-18 02:44:46
Author: eric_niebler
Date: 2008-03-18 02:44:45 EDT (Tue, 18 Mar 2008)
New Revision: 43696
URL: http://svn.boost.org/trac/boost/changeset/43696
Log:
better, restrict fix to gcc-4.0
Text files modified:
trunk/boost/xpressive/match_results.hpp | 16 ++++++++++++++++
1 files changed, 16 insertions(+), 0 deletions(-)
Modified: trunk/boost/xpressive/match_results.hpp
==============================================================================
--- trunk/boost/xpressive/match_results.hpp (original)
+++ trunk/boost/xpressive/match_results.hpp 2008-03-18 02:44:45 EDT (Tue, 18 Mar 2008)
@@ -30,6 +30,7 @@
#include <boost/config.hpp>
#include <boost/assert.hpp>
#include <boost/integer.hpp>
+#include <boost/mpl/if.hpp>
#include <boost/mpl/not.hpp>
#include <boost/mpl/size_t.hpp>
#include <boost/mpl/assert.hpp>
@@ -37,6 +38,7 @@
#include <boost/throw_exception.hpp>
#include <boost/iterator_adaptors.hpp>
#include <boost/utility/enable_if.hpp>
+#include <boost/detail/workaround.hpp>
#include <boost/numeric/conversion/converter.hpp>
#include <boost/range/end.hpp>
#include <boost/range/begin.hpp>
@@ -318,6 +320,7 @@
: mpl::not_<is_function<T> >
{};
+#if BOOST_WORKAROUND(__GNUC__, == 4) && (__GNUC_MINOR__ == 0)
// work around gcc-4.0.1 compiler bug wrt function references
template<typename T>
typename mpl::if_<is_function<T>, T *, T const &>::type
@@ -325,6 +328,7 @@
{
return t;
}
+#endif
} // detail
@@ -865,7 +869,11 @@
, mpl::size_t<1>
) const
{
+ #if BOOST_WORKAROUND(__GNUC__, == 4) && (__GNUC_MINOR__ == 0)
return this->format2_(out, detail::as_callable(format)(*this));
+ #else
+ return this->format2_(out, format(*this));
+ #endif
}
/// INTERNAL ONLY
@@ -879,7 +887,11 @@
, mpl::size_t<2>
) const
{
+ #if BOOST_WORKAROUND(__GNUC__, == 4) && (__GNUC_MINOR__ == 0)
return detail::as_callable(format)(*this, out);
+ #else
+ return format(*this, out);
+ #endif
}
/// INTERNAL ONLY
@@ -893,7 +905,11 @@
, mpl::size_t<3>
) const
{
+ #if BOOST_WORKAROUND(__GNUC__, == 4) && (__GNUC_MINOR__ == 0)
return detail::as_callable(format)(*this, out, flags);
+ #else
+ return format(*this, out, flags);
+ #endif
}
/// INTERNAL ONLY
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