Re: [ANN] Phoenix-2 Preview

27 Nov
2004
27 Nov
'04
2:01 a.m.
Zhuo Qiang wrote:
That's right. That's the correct behavior. As noted in the docs: The type of the local variable assumes the type of the lambda-expression. Type deduction is reference preserving. For example: let(_a = arg1, _b = 456) _a assumes the type of arg1: a reference to an argument, while _b has type int. This is necessary because otherwise, we won't have l-value access to outer lambda-scopes.
Exactly! args are L-values. vals are R-values. I'll emphasize that in the docs. Mind if I steal your example? Regards, -- Joel de Guzman http://www.boost-consulting.com http://spirit.sf.net
7516
Age (days ago)
7516
Last active (days ago)
0 comments
1 participants
participants (1)
-
Joel