Problem with Spirit Karma inherited attributes

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Problem with Spirit Karma inherited attributes

Thomas Schulze
Hi all,

I have a curious problem with karma inherited attributes. I just compiled a reference
example from Dr. Hartmut Kaiser:
http://boost-spirit.com/home/articles/karma-examples/generate-escaped-string-output-using-spirit-karma/#respond
(following the direct SVN link embedded in above: http://svn.boost.org/svn/boost/trunk/boost/spirit/home/karma/string/symbols.hpp )

I get the following error (among others):
boost_1_55_0/boost/spirit/home/karma/auxiliary/lazy.hpp:95:80: error: no type named 'type' in 'boost::result_of<boost::phoenix::actor<boost::phoenix::composite<boost::phoenix::detail::function_eval<1>, boost::fusion::vector<boost::phoenix::value<boost::spirit::terminal<boost::spirit::tag::lit> >, boost::spirit::attribute<1>, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_> > > (boost::spirit::unused_type, boost::spirit::context<boost::fusion::cons<const std::__1::basic_string<char> &, boost::fusion::cons<const char *, boost::fusion::nil_> >, boost::fusion::vector0<void> >)>'

I am using Boost 1 55 0 on MacOSX (clang)

The same error is generated when using another grammar with inherited attributes - I am lost here.

Thanks a lot in advance for any hint.

Kind regards
Thomas Schulze




------------------------------------------------------------------------------
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds
_______________________________________________
Spirit-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/spirit-general

smime.p7s (5K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Problem with Spirit Karma inherited attributes

Robert Rumpf
This post has NOT been accepted by the mailing list yet.
I've had this problem as well, and have solved it by a mixture of the following:
 - Defining BOOST_SPIRIT_USE_PHOENIX_V3.  This appears to be a new requirement as of Boost 1.55 (since 1.54 works fine without it - perhaps Phoenix has changed underneath and Spirit hasn't accounted for it).
 - Being sure that I define any phoenix functor according to this example http://www.boost.org/doc/libs/1_56_0/libs/utility/utility.htm#result_of (where again, the things have changed from my earlier Spirit experiences).

Thanks, and good luck,
Rob Rumpf