[phoenix] lazy function to reference or const reference

Hi,
Is it possible to use references as the type of the function wrapped
by lazy function. The reason I need this is because I need to
instatiate a lazy function inside a class and to a class while the
class does not have yet a complete definition. The application may
sound exotic but I see no intrinsic limitation why the following
doesn't work. If this is not possible because an intrinsic limitation
of phoenix, is there a workaround?
-- Thanks -- Alfredo
... is_odd_impl is defined as in
http://svn.boost.org/svn/boost/sandbox/SOC/2010/phoenix3/libs/phoenix/doc/ht...
#include<iostream>
#include
, void, void, void, void, void, void, void, void, void, void>::type’

On Monday, April 04, 2011 10:29:57 AM alfC wrote:
Hi,
Is it possible to use references as the type of the function wrapped by lazy function. The reason I need this is because I need to instatiate a lazy function inside a class and to a class while the class does not have yet a complete definition. The application may sound exotic but I see no intrinsic limitation why the following doesn't work. If this is not possible because an intrinsic limitation of phoenix, is there a workaround?
I messed up in the type calculation ;) Thanks for reporting, the issue is now fixed on trunk.
-- Thanks -- Alfredo
... is_odd_impl is defined as in
http://svn.boost.org/svn/boost/sandbox/SOC/2010/phoenix3/libs/phoenix/doc/ht... Please update your copy of Phoenix. Phoenix V3 is now in the boost trunk, the sandbox/SOC version will not get fixed anymore. https://svn.boost.org/svn/boost/trunk/libs/phoenix/doc/html/phoenix/starter_...

On Apr 4, 2:53 am, Thomas Heller
I messed up in the type calculation ;) Thanks for reporting, the issue is now fixed on trunk.
great, thanks, now it works.
What I wanted to achieve was a function class that is at the same time
a lazy function,
A a;
a(5.); //calls the usual operator()
a(arg1 + 1.); // build a phoenix expression
maybe implemented like below. However I can't, the compilation error
was
usr/include/boost/type_traits/is_abstract.hpp:72:4: error: incomplete
type ‘A’ not allowed.
Is there an elegant way to achieve this? -- Thanks -- Alfredo
#include
participants (2)
-
alfC
-
Thomas Heller