Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r56613 - in trunk/boost/spirit/home: karma/auxiliary qi/auxiliary support/auxiliary
From: hartmut.kaiser_at_[hidden]
Date: 2009-10-05 18:48:12


Author: hkaiser
Date: 2009-10-05 18:48:11 EDT (Mon, 05 Oct 2009)
New Revision: 56613
URL: http://svn.boost.org/trac/boost/changeset/56613

Log:
Spirit: fixing duplicate attr_cast definition
Added:
   trunk/boost/spirit/home/support/auxiliary/
   trunk/boost/spirit/home/support/auxiliary/attr_cast.hpp (contents, props changed)
Text files modified:
   trunk/boost/spirit/home/karma/auxiliary/attr_cast.hpp | 29 +----------------------------
   trunk/boost/spirit/home/qi/auxiliary/attr_cast.hpp | 29 +----------------------------
   2 files changed, 2 insertions(+), 56 deletions(-)

Modified: trunk/boost/spirit/home/karma/auxiliary/attr_cast.hpp
==============================================================================
--- trunk/boost/spirit/home/karma/auxiliary/attr_cast.hpp (original)
+++ trunk/boost/spirit/home/karma/auxiliary/attr_cast.hpp 2009-10-05 18:48:11 EDT (Mon, 05 Oct 2009)
@@ -13,11 +13,11 @@
 #include <boost/spirit/home/karma/meta_compiler.hpp>
 #include <boost/spirit/home/karma/generator.hpp>
 #include <boost/spirit/home/karma/domain.hpp>
-#include <boost/spirit/home/karma/detail/output_iterator.hpp>
 #include <boost/spirit/home/support/unused.hpp>
 #include <boost/spirit/home/support/info.hpp>
 #include <boost/spirit/home/support/common_terminals.hpp>
 #include <boost/spirit/home/support/attributes.hpp>
+#include <boost/spirit/home/support/auxiliary/attr_cast.hpp>
 
 namespace boost { namespace spirit
 {
@@ -27,33 +27,6 @@
     struct use_terminal<karma::domain
           , tag::stateful_tag<Expr, tag::attr_cast, Exposed, Transformed> >
       : mpl::true_ {};
-
- ///////////////////////////////////////////////////////////////////////////
- // This one is the function that the user can call directly in order
- // to create a customized attr_cast component
- template <typename Expr>
- typename enable_if<proto::is_expr<Expr>
- , stateful_tag_type<Expr, tag::attr_cast> >::type
- attr_cast(Expr const& expr)
- {
- return stateful_tag_type<Expr, tag::attr_cast>(expr);
- }
-
- template <typename Exposed, typename Expr>
- typename enable_if<proto::is_expr<Expr>
- , stateful_tag_type<Expr, tag::attr_cast, Exposed> >::type
- attr_cast(Expr const& expr)
- {
- return stateful_tag_type<Expr, tag::attr_cast, Exposed>(expr);
- }
-
- template <typename Exposed, typename Transformed, typename Expr>
- typename enable_if<proto::is_expr<Expr>
- , stateful_tag_type<Expr, tag::attr_cast, Exposed, Transformed> >::type
- attr_cast(Expr const& expr)
- {
- return stateful_tag_type<Expr, tag::attr_cast, Exposed, Transformed>(expr);
- }
 }}
 
 namespace boost { namespace spirit { namespace karma

Modified: trunk/boost/spirit/home/qi/auxiliary/attr_cast.hpp
==============================================================================
--- trunk/boost/spirit/home/qi/auxiliary/attr_cast.hpp (original)
+++ trunk/boost/spirit/home/qi/auxiliary/attr_cast.hpp 2009-10-05 18:48:11 EDT (Mon, 05 Oct 2009)
@@ -17,7 +17,7 @@
 #include <boost/spirit/home/support/info.hpp>
 #include <boost/spirit/home/support/common_terminals.hpp>
 #include <boost/spirit/home/support/attributes.hpp>
-#include <boost/utility/enable_if.hpp>
+#include <boost/spirit/home/support/auxiliary/attr_cast.hpp>
 
 namespace boost { namespace spirit
 {
@@ -30,33 +30,6 @@
     struct use_terminal<qi::domain
           , tag::stateful_tag<Expr, tag::attr_cast, Exposed, Transformed> >
       : mpl::true_ {};
-
- ///////////////////////////////////////////////////////////////////////////
- // This one is the function that the user can call directly in order
- // to create a customized attr_cast component
- template <typename Expr>
- typename enable_if<proto::is_expr<Expr>
- , stateful_tag_type<Expr, tag::attr_cast> >::type
- attr_cast(Expr const& expr)
- {
- return stateful_tag_type<Expr, tag::attr_cast>(expr);
- }
-
- template <typename Exposed, typename Expr>
- typename enable_if<proto::is_expr<Expr>
- , stateful_tag_type<Expr, tag::attr_cast, Exposed> >::type
- attr_cast(Expr const& expr)
- {
- return stateful_tag_type<Expr, tag::attr_cast, Exposed>(expr);
- }
-
- template <typename Exposed, typename Transformed, typename Expr>
- typename enable_if<proto::is_expr<Expr>
- , stateful_tag_type<Expr, tag::attr_cast, Exposed, Transformed> >::type
- attr_cast(Expr const& expr)
- {
- return stateful_tag_type<Expr, tag::attr_cast, Exposed, Transformed>(expr);
- }
 }}
 
 namespace boost { namespace spirit { namespace qi

Added: trunk/boost/spirit/home/support/auxiliary/attr_cast.hpp
==============================================================================
--- (empty file)
+++ trunk/boost/spirit/home/support/auxiliary/attr_cast.hpp 2009-10-05 18:48:11 EDT (Mon, 05 Oct 2009)
@@ -0,0 +1,47 @@
+// Copyright (c) 2001-2009 Hartmut Kaiser
+//
+// 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_SUPPORT_ATTR_CAST_OCT_06_2009_00535PM)
+#define SPIRIT_SUPPORT_ATTR_CAST_OCT_06_2009_00535PM
+
+#if defined(_MSC_VER)
+#pragma once
+#endif
+
+#include <boost/spirit/home/support/common_terminals.hpp>
+#include <boost/spirit/home/support/attributes.hpp>
+#include <boost/utility/enable_if.hpp>
+
+namespace boost { namespace spirit
+{
+ ///////////////////////////////////////////////////////////////////////////
+ // This one is the function that the user can call directly in order
+ // to create a customized attr_cast component
+ template <typename Expr>
+ typename enable_if<proto::is_expr<Expr>
+ , stateful_tag_type<Expr, tag::attr_cast> >::type
+ attr_cast(Expr const& expr)
+ {
+ return stateful_tag_type<Expr, tag::attr_cast>(expr);
+ }
+
+ template <typename Exposed, typename Expr>
+ typename enable_if<proto::is_expr<Expr>
+ , stateful_tag_type<Expr, tag::attr_cast, Exposed> >::type
+ attr_cast(Expr const& expr)
+ {
+ return stateful_tag_type<Expr, tag::attr_cast, Exposed>(expr);
+ }
+
+ template <typename Exposed, typename Transformed, typename Expr>
+ typename enable_if<proto::is_expr<Expr>
+ , stateful_tag_type<Expr, tag::attr_cast, Exposed, Transformed> >::type
+ attr_cast(Expr const& expr)
+ {
+ return stateful_tag_type<Expr, tag::attr_cast, Exposed, Transformed>(expr);
+ }
+}}
+
+#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