
27 Nov
2004
27 Nov
'04
5:32 a.m.
Zhuo Qiang wrote:
what about _a = var(arg1) which IMO is more explicit
I considered that syntax too. Unecessarily verbose, IMO. The argN (like var(x)) already has reference semantics. That is why you can write: ++arg1 for example, instead of the more verbose: ++var(arg1). IMO, argN should always be implicitly an L-value, for consistency.
though the following code gives what I expect: int i = 1;
let(_a = val(_1)) [ cout << --_a << ' ' ](i); cout << i << endl;
Exactly! args are L-values. vals are R-values.
I'll emphasize that in the docs. Mind if I steal your example?
Sure! As you wish.
Done :-) Thanks! -- Joel de Guzman http://www.boost-consulting.com http://spirit.sf.net
7503
Age (days ago)
7503
Last active (days ago)
0 comments
1 participants
participants (1)
-
Joel