Subject: Re: phoenix lambda-lambda for_each example
From: Aleksey Gurtovoy <[email-masked]>
To: Joel de Guzman <[email-masked]>
Cc: David Abrahams <[email-masked]>, Noah Stein <[email-masked]>, [email-masked], Jaakko Jarvi <[email-masked]>
Date: Tue, 02 Mar 2004 21:31:19 -0600

Joel de Guzman writes:
>> Actually that case is kind of strange.  I think in MPL we're
>> deciding
>> that you need to do something like:
>>   for_each(arg1, function(for_each(arg1, cout << arg1 << ' ')))(v)
>> to prevent v from being substituted into *all* of the arg1s.
>
> I thought about that too. Upon meditation, I realized it is
> not necessary. In this case, Phoenix has scope! 

What if I don't want the scope there?

    std::vector<int> v1, v2;
    copy( arg1, back_inserter(arg2) )(v1, v2); // fails???

-- 
Aleksey Gurtovoy
MetaCommunications Engineering