Boost logo

Boost Users :

Subject: Re: [Boost-users] [phoenix][lambda] lambda to phoenix translation: get sig (signature) from actor
From: alfC (alfredo.correa_at_[hidden])
Date: 2010-05-29 23:26:34


> I am not sure if this is the best way to do it in either Lambda nor
> Phoenix (I'm pretty sure that even with lambda, you are going beyond
> the documentation, no?).

I guess that extracting subexpressions (and subexpression types) of an
expression goes beyond Lambda and Phoenix documentation.
and yes that is what I am trying to do.

> However, I am not knowledgeable enough of the
> domain you are involved with, nor do I know what qawc means.

qawc is an interface to http://tinyurl.com/gslqwac
now you can imagine what I a trying to do, basically extract the
function information from a lambda expression.

> In Phoenix (see Actors In Detail at:http://tinyurl.com/24wlduz),
> a lambda is always an:
>
>    actor<Eval>
> The documented "result" protocol for Eval is:
>
>     T::result<Env>::type
>
> where Env is your environment (See the link I provided above). Typically,
> for client use, the environment is just basic_environment<...>.

well I tried this and didn't work
 typename
actor<LambdaExp>::result<basic_environment<quantity<UnitIntegrandDomain>
> >::type

now my closest guess is
 typename actor<LambdaExp>::template
result<actor<LambdaExp>(quantity<UnitIntegrandDomain>)>::type

which is almost the type I am trying to generate but it is of
'const&' (const reference) type which is a problem for a return type
because
of 'returning reference to temporary'.

Thank you,
Alfredo


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net