|
Boost : |
Subject: Re: [boost] Library design Q : overloads v/s default args
From: Stefan Strasser (strasser_at_[hidden])
Date: 2010-06-20 06:17:43
Zitat von Roshan <roshan_naik_at_[hidden]>:
> 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.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk