Boost logo

Boost :

From: Markus Schöpflin (markus.schoepflin_at_[hidden])
Date: 2003-02-18 11:38:30


Jeff Garland wrote:

> Take a look at bosot/date_time/compiler_config.hpp which
> does something similar. All we need to do to fix these regressions
> is add the compiler to the list of those that don't have std::abs
> at line 34. Turns out that some compilers that support long long
> do define a version of abs for long long. (I'm sure you also
> know that some compilers don't call it the type long long
> either which is why we have boost::int64_t).

The problem is, VA _has_ std::abs. You just need a specialization for
long long then.

namespace std {
template<> long long abs(long long n) { return llabs(n); }
}

Don't know if this is legal, though.

Markus


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