
20 Jun
2010
20 Jun
'10
10:38 a.m.
At Sun, 20 Jun 2010 12:17:43 +0200, Stefan Strasser wrote:
Zitat von Roshan <roshan_naik@yahoo.com>:
template<class Itr, class T, class BinOp> accumulate(Itr first, Itr last, T init, BinOp op = std::plus<T>() );
I am wondering if there is any reason to avoid default arguments in general purpose libraries ?
this case won't compile, template arguments are not deduced from default arguments.
A problem, incidentally, that can be solved using Boost.Parameter. -- Dave Abrahams BoostPro Computing http://www.boostpro.com