
On 14 October 2010 22:36, Hartmut Kaiser <hartmut.kaiser@gmail.com> wrote:
That should be easy, see below.
start = a_rule | b_rule | c_rule;
<snip>
qi::rule<Iterator, std::vector<int>()> a_rule; qi::rule<Iterator, std::vector<int>()> b_rule; qi::rule<Iterator, std::vector<int>()> c_rule;
qi::rule<Iterator, std::vector<int>()> start;
Hi Hartmut, Thanks for your help. I've upgraded my version of Spirit to the one from Boost 1.44, so things work better now. However, I'm still unable to compile when I change my rule to something like: start = a_rule | *b_rule. The * and + operators cause the compiler to generate the following error: boost/spirit/home/qi/detail/assign_to.hpp:109: error: invalid static_cast from type ‘const std::vector<int, std::allocator<int> >’ to type ‘int'. Any ideas? Thanks, Vitaly