|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r56635 - in trunk/boost/spirit: . home/karma home/support include
From: hartmut.kaiser_at_[hidden]
Date: 2009-10-07 13:12:39
Author: hkaiser
Date: 2009-10-07 13:12:39 EDT (Wed, 07 Oct 2009)
New Revision: 56635
URL: http://svn.boost.org/trac/boost/changeset/56635
Log:
Spirit: disable Phoenix attributes for V2.1
Added:
trunk/boost/spirit/include/version.hpp (contents, props changed)
Text files modified:
trunk/boost/spirit/home/karma/phoenix_attributes.hpp | 11 +++++++++++
trunk/boost/spirit/home/support/container.hpp | 15 +++++++++++++++
trunk/boost/spirit/home/support/context.hpp | 2 +-
trunk/boost/spirit/version.hpp | 8 +-------
4 files changed, 28 insertions(+), 8 deletions(-)
Modified: trunk/boost/spirit/home/karma/phoenix_attributes.hpp
==============================================================================
--- trunk/boost/spirit/home/karma/phoenix_attributes.hpp (original)
+++ trunk/boost/spirit/home/karma/phoenix_attributes.hpp 2009-10-07 13:12:39 EDT (Wed, 07 Oct 2009)
@@ -10,6 +10,11 @@
#pragma once
#endif
+#include <boost/spirit/include/version.hpp>
+
+// we support Phoenix attributes only starting with V2.2
+#if SPIRIT_VERSION >= 0x2020
+
#include <boost/spirit/home/support/attributes.hpp>
#include <boost/spirit/home/support/container.hpp>
@@ -25,6 +30,11 @@
// attribute (Kleene, plus, list, repeat, etc.)
///////////////////////////////////////////////////////////////////////////
template <typename Eval>
+ struct is_container<phoenix::actor<Eval> const>
+ : is_container<typename boost::result_of<phoenix::actor<Eval>()>::type>
+ {};
+
+ template <typename Eval>
struct container_iterator<phoenix::actor<Eval> const>
{
typedef phoenix::actor<Eval> const& type;
@@ -97,3 +107,4 @@
}}}
#endif
+#endif
Modified: trunk/boost/spirit/home/support/container.hpp
==============================================================================
--- trunk/boost/spirit/home/support/container.hpp (original)
+++ trunk/boost/spirit/home/support/container.hpp 2009-10-07 13:12:39 EDT (Wed, 07 Oct 2009)
@@ -49,6 +49,11 @@
{};
template <typename T>
+ struct is_container<T&>
+ : is_container<T>
+ {};
+
+ template <typename T>
struct is_container<optional<T> >
: is_container<T>
{};
@@ -130,6 +135,11 @@
{};
//]
+ template <typename T>
+ struct container_value<T&>
+ : container_value<T>
+ {};
+
// this will be instantiated if the optional holds a container
template <typename T>
struct container_value<optional<T> >
@@ -177,6 +187,11 @@
};
template <typename Container>
+ struct container_iterator<Container&>
+ : container_iterator<Container>
+ {};
+
+ template <typename Container>
struct container_iterator<Container const>
{
typedef typename Container::const_iterator type;
Modified: trunk/boost/spirit/home/support/context.hpp
==============================================================================
--- trunk/boost/spirit/home/support/context.hpp (original)
+++ trunk/boost/spirit/home/support/context.hpp 2009-10-07 13:12:39 EDT (Wed, 07 Oct 2009)
@@ -170,7 +170,7 @@
phoenix::actor<attribute<1> > const _r1 = attribute<1>();
phoenix::actor<attribute<2> > const _r2 = attribute<2>();
- // Bring in the rest of the attributes (_4 .. _N+1), using PP
+ // Bring in the rest of the attributes (_r4 .. _rN+1), using PP
BOOST_PP_REPEAT_FROM_TO(
3, SPIRIT_ATTRIBUTES_LIMIT, SPIRIT_DECLARE_ATTRIBUTE, _)
Added: trunk/boost/spirit/include/version.hpp
==============================================================================
--- (empty file)
+++ trunk/boost/spirit/include/version.hpp 2009-10-07 13:12:39 EDT (Wed, 07 Oct 2009)
@@ -0,0 +1,20 @@
+/*=============================================================================
+ Copyright (c) 2001-2009 Joel de Guzman
+ Copyright (c) 2001-2009 Hartmut Kaiser
+ http://spirit.sourceforge.net/
+
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+=============================================================================*/
+#if !defined(SPIRIT_VERSION_NOVEMBER_13_2008_0834AM)
+#define SPIRIT_VERSION_NOVEMBER_13_2008_0834AM
+
+///////////////////////////////////////////////////////////////////////////////
+//
+// This is the version of the current Spirit distribution
+//
+///////////////////////////////////////////////////////////////////////////////
+#define SPIRIT_VERSION 0x2010
+#define SPIRIT_PIZZA_VERSION COSMIC_KARMA // :-)
+
+#endif
Modified: trunk/boost/spirit/version.hpp
==============================================================================
--- trunk/boost/spirit/version.hpp (original)
+++ trunk/boost/spirit/version.hpp 2009-10-07 13:12:39 EDT (Wed, 07 Oct 2009)
@@ -9,12 +9,6 @@
#if !defined(SPIRIT_VERSION_NOVEMBER_13_2008_0834AM)
#define SPIRIT_VERSION_NOVEMBER_13_2008_0834AM
-///////////////////////////////////////////////////////////////////////////////
-//
-// This is the version of the current Spirit distribution
-//
-///////////////////////////////////////////////////////////////////////////////
-#define SPIRIT_VERSION 0x2010
-#define SPIRIT_PIZZA_VERSION COSMIC_KARMA // :-)
+#include <boost/spirit/include/version.hpp>
#endif
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