
13 Apr
2006
13 Apr
'06
11:50 p.m.
Darren Cook <darren@dcook.org> writes:
inline bool less( x, y ) { return x < y; } ... be leaving out the parameter type. I think that is fine, but I'd thus rather make lambdas look different so that there is no confusion of what kind of parameter list we are dealing with.
(e.g. with the syntax <>(x, y) { return x < y; } )
It seems to me that the use of the "inline" keyword inside a function body makes it stand out sufficiently. The use of "auto" or "<>" is no better at making it stand out, but not as meaningful when reading the code.
I actually like inline, even if it is a bit longer than auto. -- Dave Abrahams Boost Consulting www.boost-consulting.com