Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r62144 - in trunk/libs/spirit/test: . qi
From: hartmut.kaiser_at_[hidden]
Date: 2010-05-22 10:28:53


Author: hkaiser
Date: 2010-05-22 10:28:52 EDT (Sat, 22 May 2010)
New Revision: 62144
URL: http://svn.boost.org/trac/boost/changeset/62144

Log:
Spirit: fixing const correctness problem, added test
Added:
   trunk/libs/spirit/test/qi/attr_with_action.cpp (contents, props changed)
Text files modified:
   trunk/libs/spirit/test/Jamfile | 1 +
   1 files changed, 1 insertions(+), 0 deletions(-)

Modified: trunk/libs/spirit/test/Jamfile
==============================================================================
--- trunk/libs/spirit/test/Jamfile (original)
+++ trunk/libs/spirit/test/Jamfile 2010-05-22 10:28:52 EDT (Sat, 22 May 2010)
@@ -152,6 +152,7 @@
 
 
     # regression tests
+ [ compile qi/attr_with_action.cpp : : qi_attr_with_action ]
     [ run qi/clear_test.cpp : : : : ]
     [ run qi/reorder_test.cpp : : : : ]
     [ run karma/karma_optional_double.cpp : : : : ]

Added: trunk/libs/spirit/test/qi/attr_with_action.cpp
==============================================================================
--- (empty file)
+++ trunk/libs/spirit/test/qi/attr_with_action.cpp 2010-05-22 10:28:52 EDT (Sat, 22 May 2010)
@@ -0,0 +1,27 @@
+// Copyright (c) 2010 Daniel James
+// Copyright (c) 2001-2010 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)
+
+// this is a compile only regression test
+
+#include <boost/config/warning_disable.hpp>
+#include <boost/spirit/include/qi.hpp>
+
+namespace qi = boost::spirit::qi;
+
+struct source_mode {};
+
+struct process_type
+{
+ template <typename A, typename B, typename C>
+ void operator()(A&, B&, C&) const {}
+};
+
+int main()
+{
+ process_type process;
+ qi::rule<char const*> x = qi::attr(source_mode()) [process];
+ return 0;
+}
\ No newline at end of file


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