22 Mar
2007
22 Mar
'07
2:08 p.m.
on Wed Mar 21 2007, Eric Niebler
Frankly, I think the proposed design (function object passed by value, or by reference with explicitly specified template arg) is ugly. It'll be ugly both from the user's perspective and in the implementation. If by-value is a perf-win in the common case (perf numbers?), then I'd prefer by-ref semantics to look like this:
for_each( seq, ref(func) );
instead of this:
for_each< Func & >( seq, func );
Good call. But please, everyone, let's avoid over-quoting. -- Dave Abrahams Boost Consulting www.boost-consulting.com