
27 Nov
2007
27 Nov
'07
5:48 p.m.
John Torjo <john.groups <at> torjo.com> writes:
But isn't the only point of local functions, the fact that you can access context information (like, the arguments passed to your function)?
Did you mean 'passed to your *outer* function'? To pass bound arguments you either 1. struct local { int& i; void body(char c) { i = c; } }; 2. struct local { static void body(int&, char c) { i = c; } The body of the former isn't static and can't be passed to a template. The former doen't have an opening bracket before your first unbound argument: int i; void BOOST_LOCAL_FUNCTION(i) char c) { } ... Note missing '(' in the first line. -- Alexander