Phoenix Example problem

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Phoenix Example problem

Fletcher, John P
Joel

I am having a problem compiling the example container_actor.cpp which is in the Phoenix manual and also the examples.  I have been compiling it with g++ 4.4.3 and also with clang 3.1 and neither works.  The clang error messages look like this:

phoenix_container_actor.cpp:58:35: error: no template named 'function' in
      namespace 'boost::phoenix::expression'; did you mean
      'boost::phoenix::function'?
    typename phoenix::expression::function<phoenix::stl::begin, ...
             ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
                                  boost::phoenix::function      
./boost/phoenix/function/function.hpp:25:12: note: 'boost::phoenix::function'
      declared here
    struct function
           ^
phoenix_container_actor.cpp:58:35: error: too many template arguments for class
      template 'function'
    typename phoenix::expression::function<phoenix::stl::begin, that_type>...
                                  ^                             ~~~~~~~~~~
./boost/phoenix/function/function.hpp:25:12: note: template is declared here
    struct function
           ^
phoenix_container_actor.cpp:58:77: error: expected a qualified name after
      'typename'
  ...that_type>::type const
                 ^
phoenix_container_actor.cpp:58:81: error: expected ';' at end of declaration
      list
  ...that_type>::type const
                     ^
                     ;    
4 errors generated.
make: *** [phoenix_container_actor_clang31] Error 1

I have looked through the phoenix headers and cannot find the namespace  boost::phoenix::expression at all.

Am I missing something?

Best wishes

John


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Spirit-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/spirit-devel
Reply | Threaded
Open this post in threaded view
|

Re: Phoenix Example problem

Joel de Guzman-4
On 7/1/2012 8:21 PM, Fletcher, John P wrote:
> Joel
>
> I am having a problem compiling the example container_actor.cpp which is in the Phoenix
> manual and also the examples.  I have been compiling it with g++ 4.4.3 and also with
> clang 3.1 and neither works.  The clang error messages look like this:

I could repro the problem. Thomas, what is phoenix::expression::function?

Regards,
--
Joel de Guzman
http://www.boostpro.com
http://boost-spirit.com





------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Spirit-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/spirit-devel
Reply | Threaded
Open this post in threaded view
|

Re: Phoenix Example problem

Fletcher, John P
Thomas

Thank you for the information.

Is it a simple patch you could post so that I can patch my installations of 1.49.0 and (presumably) 1.50.0?

I had found phoenix::detail::expression::function_eval while searching the code and also the table at

http://boost-sandbox.sourceforge.net/libs/phoenix/doc/html/phoenix/inside/rules.html

so I thought it was supposed to exist.

Thanks

John

________________________________________
From: Thomas Heller [[hidden email]]
Sent: 02 July 2012 07:32
To: Joel de Guzman
Cc: Fletcher, John P; Spirit Development; Thomas Heller
Subject: Re: Phoenix Example problem

On 07/02/2012 01:56 AM, Joel de Guzman wrote:

> On 7/1/2012 8:21 PM, Fletcher, John P wrote:
>> Joel
>>
>> I am having a problem compiling the example container_actor.cpp which
>> is in the Phoenix
>> manual and also the examples.  I have been compiling it with g++
>> 4.4.3 and also with
>> clang 3.1 and neither works.  The clang error messages look like this:
>
> I could repro the problem. Thomas, what is phoenix::expression::function?
Thanks for bringing it to my attention. Fixed on trunk.
phoenix::expression::function is supposed to be a struct responsible for
creating expression template
objects and calculating the expression template type for a phoenix
function expression. Looks like i just forgot
to alias it ... there was already a
phoenix::detail::expression::function_eval which is part of the core,
and used in a variety of places (for example bind).
more information about these expression types can be found here:
http://boost-sandbox.sourceforge.net/libs/phoenix/doc/html/phoenix/inside/expression.html
and here:
http://boost-sandbox.sourceforge.net/libs/phoenix/doc/html/phoenix/inside/rules.html

>
> Regards,




------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Spirit-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/spirit-devel