
9 Mar
2011
9 Mar
'11
11:35 p.m.
AMDG On 03/09/2011 03:26 PM, er wrote:
Is there a variant of this
int i = 0; lambda::var( i )++;
in which I can do away with the external variable, i? In other words, a nullary functor that returns 0, 1, 2, successively?
No. Remember that function objects are copyable. The state needs to be stored separately to avoid problems. In Christ, Steven Watanabe