|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r84285 - in trunk: boost/spirit/home/lex/lexer libs/spirit/test libs/spirit/test/lex
From: hartmut.kaiser_at_[hidden]
Date: 2013-05-14 19:43:48
Author: hkaiser
Date: 2013-05-14 19:43:46 EDT (Tue, 14 May 2013)
New Revision: 84285
URL: http://svn.boost.org/trac/boost/changeset/84285
Log:
Fix #8563: Compilation error with boost::spirit::lex::less actor
Added:
trunk/libs/spirit/test/lex/regression_less_8563.cpp (contents, props changed)
Text files modified:
trunk/boost/spirit/home/lex/lexer/support_functions.hpp | 6 ++++--
trunk/libs/spirit/test/Jamfile | 1 +
2 files changed, 5 insertions(+), 2 deletions(-)
Modified: trunk/boost/spirit/home/lex/lexer/support_functions.hpp
==============================================================================
--- trunk/boost/spirit/home/lex/lexer/support_functions.hpp (original)
+++ trunk/boost/spirit/home/lex/lexer/support_functions.hpp 2013-05-14 19:43:46 EDT (Tue, 14 May 2013)
@@ -48,8 +48,10 @@
struct result
{
typedef typename
- remove_const<
- typename mpl::at_c<typename Env::args_type, 4>::type
+ typename remove_reference<
+ remove_const<
+ typename mpl::at_c<typename Env::args_type, 4>::type
+ >::type
>::type
context_type;
typedef typename context_type::base_iterator_type type;
Modified: trunk/libs/spirit/test/Jamfile
==============================================================================
--- trunk/libs/spirit/test/Jamfile (original)
+++ trunk/libs/spirit/test/Jamfile 2013-05-14 19:43:46 EDT (Tue, 14 May 2013)
@@ -304,6 +304,7 @@
[ run lex/regression_file_iterator3.cpp : : : : lex_regression_file_iterator3 ]
[ run lex/regression_file_iterator4.cpp : : : : lex_regression_file_iterator4 ]
[ run lex/regression_static_wide_6253.cpp : : : : regression_static_wide_6253 ]
+ [ run lex/regression_less_8563.cpp : : : : regression_less_8563 ]
;
Added: trunk/libs/spirit/test/lex/regression_less_8563.cpp
==============================================================================
--- (empty file)
+++ trunk/libs/spirit/test/lex/regression_less_8563.cpp 2013-05-14 19:43:46 EDT (Tue, 14 May 2013)
@@ -0,0 +1,40 @@
+// Copyright (c) 2013 Andreas Pokorny
+//
+// 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)
+
+#define BOOST_SPIRIT_USE_PHOENIX_V3 1
+
+#include <boost/detail/lightweight_test.hpp>
+#include <boost/config/warning_disable.hpp>
+
+#include <boost/phoenix.hpp>
+#include <boost/spirit/include/lex_lexertl.hpp>
+
+#include <fstream>
+
+using namespace std;
+using namespace boost::spirit;
+
+template <typename BaseLexer>
+struct test_lexer : boost::spirit::lex::lexer<BaseLexer>
+{
+ test_lexer()
+ {
+ this->self = lex::string("just something")
+ [
+ lex::_end = lex::less(boost::phoenix::val(1))
+ ]
+ ;
+ }
+};
+
+int main(int argc, char* argv[])
+{
+ typedef lex::lexertl::token<char const*> token_type;
+ typedef lex::lexertl::actor_lexer<token_type> lexer_type;
+
+ test_lexer<lexer_type> lexer;
+
+ return boost::report_errors();
+}
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