Boost logo

Boost :

From: Gabriel Dos Reis (gdr_at_[hidden])
Date: 2003-04-15 17:57:33


Tarjei Knapstad <tarjeik_at_[hidden]> writes:

| On Wed, 2003-04-09 at 21:42, Paul A. Bristow wrote:
| > Following discussions with Walter Brown, who made a previous proposal for some
| > math functions (adding to the C99 functions proposed by P J Plauger),
| > I have prepared a draft of a new proposal to add a good number of other 'special
| > functions' which I believe have even greater practical utility (but perhaps more
| > difficulty in implementation).
| >
| Most of these aren't too hard to implement IIRC, but I have one remark.
| In your proposal you state that overloads would be preferable to
| function templates.

IMO, that is a mistake. The lesson we learnt from the previous
experience with overloads is that they tend to break code which were
previously valid or has well defined semantics in C.

  #include <math.h>

  int main()
  {
    return !cos(2);
  }

Use resticted templates -- and the code tends to be the same anyway.

-- Gaby


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk