|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r63908 - in trunk/boost/spirit/home: karma/detail support
From: hartmut.kaiser_at_[hidden]
Date: 2010-07-11 22:01:24
Author: hkaiser
Date: 2010-07-11 22:01:23 EDT (Sun, 11 Jul 2010)
New Revision: 63908
URL: http://svn.boost.org/trac/boost/changeset/63908
Log:
Spirit: Adding workaround to enable more tests to compile with gcc 3.4.x
Text files modified:
trunk/boost/spirit/home/karma/detail/extract_from.hpp | 12 ++++++------
trunk/boost/spirit/home/support/attributes_fwd.hpp | 10 +++++++++-
2 files changed, 15 insertions(+), 7 deletions(-)
Modified: trunk/boost/spirit/home/karma/detail/extract_from.hpp
==============================================================================
--- trunk/boost/spirit/home/karma/detail/extract_from.hpp (original)
+++ trunk/boost/spirit/home/karma/detail/extract_from.hpp 2010-07-11 22:01:23 EDT (Sun, 11 Jul 2010)
@@ -12,6 +12,7 @@
#include <boost/spirit/home/phoenix/core/actor.hpp>
#include <boost/spirit/home/support/unused.hpp>
+#include <boost/spirit/home/support/attributes_fwd.hpp>
#include <boost/spirit/home/karma/detail/attributes.hpp>
#include <boost/spirit/home/support/container.hpp>
@@ -42,11 +43,6 @@
{};
}
- // forward declaration only
- template <typename Exposed, typename Attribute, typename Context>
- typename spirit::result_of::extract_from<Exposed, Attribute>::type
- extract_from(Attribute const& attr, Context& ctx);
-
// This is the default case: the plain attribute values
template <typename Attribute, typename Exposed, typename Enable/*= void*/>
struct extract_from_attribute
@@ -123,7 +119,11 @@
///////////////////////////////////////////////////////////////////////////
template <typename Exposed, typename Attribute, typename Context>
typename spirit::result_of::extract_from<Exposed, Attribute>::type
- extract_from(Attribute const& attr, Context& ctx)
+ extract_from(Attribute const& attr, Context& ctx
+#if defined(__GNUC__) && (__GNUC__ < 4)
+ , typename enable_if<traits::not_is_unused<Attribute> >::type*
+#endif
+ )
{
return extract_from_attribute<Attribute, Exposed>::call(attr, ctx);
}
Modified: trunk/boost/spirit/home/support/attributes_fwd.hpp
==============================================================================
--- trunk/boost/spirit/home/support/attributes_fwd.hpp (original)
+++ trunk/boost/spirit/home/support/attributes_fwd.hpp 2010-07-11 22:01:23 EDT (Sun, 11 Jul 2010)
@@ -12,6 +12,10 @@
#pragma once
#endif
+#if defined(__GNUC__) && (__GNUC__ < 4)
+#include <boost/utility/enable_if.hpp>
+#endif
+
///////////////////////////////////////////////////////////////////////////////
namespace boost { namespace spirit { namespace result_of
{
@@ -104,7 +108,11 @@
template <typename Exposed, typename Attribute, typename Context>
typename spirit::result_of::extract_from<Exposed, Attribute>::type
- extract_from(Attribute const& attr, Context& ctx);
+ extract_from(Attribute const& attr, Context& ctx
+#if defined(__GNUC__) && (__GNUC__ < 4)
+ , typename enable_if<traits::not_is_unused<Attribute> >::type* = NULL
+#endif
+ );
///////////////////////////////////////////////////////////////////////////
// return the type currently stored in the given variant
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