
13 Apr
2006
13 Apr
'06
5:02 p.m.
David Abrahams wrote:
cases, and especially those cases where the function needs or ought to be templated. I think the syntax should be
auto(x){ x->first < 0 }
where is "return" ?
DA> Good observation. Nowhere. Have you got a problem with that? Also DA> no semicolon. So, auto(x){ x->first < 0 } returns bool, and auto(x){ x->first < 0; } returns void? I think it is very confusing and error prone to change the return type when user misses (or accidently types) a semicolon. Valentin Samko http://val.samko.info