Boost logo

Boost :

From: jsiek_at_[hidden]
Date: 1999-12-20 15:09:46

Save the abs()! :)

abs() is one of the more commonly used operations on numbers in
general. I think people would find it very surprising if it was
not there.

Also, why punish those who have good compilers? If you really don't
want to deal with the VC++ junk, just ifdef out the abs() function
for VC++ (and document the fact), but leave it in for the others.



Moore, Paul writes:
> From: jsiek_at_[hidden] [mailto:jsiek_at_[hidden]]
> >
> > I meant to suggest that you put the MSVCPP macro in your library's
> > config header, with something like this:
> >
> > #if defined(_MSC_VER) && !defined(__MWERKS__) ...
> > #define MSVCPP
> > #endif
> OK, that's fine - if someone can define the ... bit for me.
> But I still think that removing abs() is better. Can anybody who is
> genuinely attached to having an abs() function for rationals, please speak
> up. Otherwise it goes. I'd like to get a working version of rational<>
> released. I can put abs() back in version N, when the larger issues on this
> whole topic have been clarified.
> If no-one starts a "save the abs" campaign, I'll produce a demo class which
> exposes the problem clearly.
> Paul.
> ------------------------------------------------------------------------
> Want to send money instantly to anyone, anywhere, anytime?
> You can today at - and we'll give you $20 to try it! Sign
> up today at It's quick, free, & there's no obligation!
> -- Talk to your group with your own voice!
> --

Boost list run by bdawes at, gregod at, cpdaniel at, john at