Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r55488 - trunk/libs/spirit/example/karma
From: hartmut.kaiser_at_[hidden]
Date: 2009-08-09 13:12:47


Author: hkaiser
Date: 2009-08-09 13:12:47 EDT (Sun, 09 Aug 2009)
New Revision: 55488
URL: http://svn.boost.org/trac/boost/changeset/55488

Log:
Spirit: fixed calc_ast examples
Text files modified:
   trunk/libs/spirit/example/karma/calc2_ast.hpp | 12 ++++++++++++
   1 files changed, 12 insertions(+), 0 deletions(-)

Modified: trunk/libs/spirit/example/karma/calc2_ast.hpp
==============================================================================
--- trunk/libs/spirit/example/karma/calc2_ast.hpp (original)
+++ trunk/libs/spirit/example/karma/calc2_ast.hpp 2009-08-09 13:12:47 EDT (Sun, 09 Aug 2009)
@@ -81,6 +81,18 @@
     {
         return boost::get<T>(expr.expr);
     }
+
+ // the specialization below tells Spirit to handle expression_ast as if it
+ // where a 'real' variant
+ namespace spirit { namespace traits
+ {
+ template <typename T>
+ struct not_is_variant;
+
+ template <>
+ struct not_is_variant<expression_ast>
+ : mpl::false_ {};
+ }}
 }
 
 ///////////////////////////////////////////////////////////////////////////////


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