|
Boost-Commit : |
From: troy_at_[hidden]
Date: 2008-05-30 09:58:01
Author: troy
Date: 2008-05-30 09:58:01 EDT (Fri, 30 May 2008)
New Revision: 45949
URL: http://svn.boost.org/trac/boost/changeset/45949
Log:
Disambiguate strip_signel_element_sequence... gcc4.2 getting confused.
Text files modified:
trunk/boost/spirit/home/support/attribute_transform.hpp | 11 ++++++++---
1 files changed, 8 insertions(+), 3 deletions(-)
Modified: trunk/boost/spirit/home/support/attribute_transform.hpp
==============================================================================
--- trunk/boost/spirit/home/support/attribute_transform.hpp (original)
+++ trunk/boost/spirit/home/support/attribute_transform.hpp 2008-05-30 09:58:01 EDT (Fri, 30 May 2008)
@@ -11,6 +11,7 @@
#include <boost/spirit/home/support/unused.hpp>
#include <boost/spirit/home/support/component.hpp>
#include <boost/spirit/home/support/attribute_of.hpp>
+#include <boost/spirit/home/support/detail/values.hpp>
#include <boost/fusion/include/vector.hpp>
#include <boost/fusion/include/is_sequence.hpp>
#include <boost/variant/variant_fwd.hpp>
@@ -25,16 +26,19 @@
namespace traits
{
+ using boost::spirit::detail::not_is_variant;
+
// Here, we provide policies for stripping single element fusion
// sequences. Add more specializations as needed.
- template <typename T, typename IsSequence>
+ template <typename T, typename IsSequence, typename Enable = void>
struct strip_single_element_sequence
{
typedef T type;
};
template <typename T>
- struct strip_single_element_sequence<fusion::vector<T>, mpl::false_>
+ struct strip_single_element_sequence<fusion::vector<T>, mpl::false_,
+ typename boost::enable_if<not_is_variant<T> >::type>
{
// Strips single element fusion vectors into its 'naked'
// form: vector<T> --> T
@@ -42,7 +46,8 @@
};
template <typename T>
- struct strip_single_element_sequence<fusion::vector<T>, mpl::true_>
+ struct strip_single_element_sequence<fusion::vector<T>, mpl::true_,
+ typename boost::enable_if<not_is_variant<T> >::type>
{
// Strips single element fusion vectors into its 'naked'
// form: vector<T> --> T, but does so only if T is not a fusion
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