Subject: Re: phoenix lambda-lambda for_each example
From: Joel de Guzman <[email-masked]>
To: Noah Stein <[email-masked]>
Cc: Aleksey Gurtovoy <[email-masked]>, David Abrahams <[email-masked]>, Jaakko Jarvi <[email-masked]>
Date: Wed, 03 Mar 2004 18:00:12 +0800

Noah Stein wrote:

> I find it a bit noisy, too; however, is there any other solution that solves
> a 3-layer (or greater) set of scopes?  Does outer refer to the immediately
> preceding scope or the topmost scope?  Is there some kind of method that can
> be used to only mark those items that need to be accessed across scopes?
> Something along the lines of one of the following:
> 
>     for_each(arg1, push_back(seq, arg1) )(v1,seq(v2));
>     for_each(arg1, push_back(seq, arg1) )(v1,seq=v2);
> 
> It might not be possible to get the above syntax to work.  I think there
> might be a convoluted method to get it to work that doesn't require run-time
> overhead.  Unfortunately it would dramatically complicate the
> behind-the-scenes code.

Remember that we do not have control over the invocation
(function call) of the lambda. The rightmost parens are
not part of the lambda.

-- 
Joel de Guzman
http://www.boost-consulting.com
http://spirit.sf.net