Boost logo

Boost :

From: Dave Abrahams (abrahams_at_[hidden])
Date: 1999-12-10 23:47:09


>
> Here's a small example that breaks with VC++ 6.0 sp3.
>
> #include <complex>
>
> int main(int,char*[])
> {
> using std::abs;
> abs(3.0);
> return 0;
> }
>
> One of the reasons for the above problem (among several I'm sure)
> is that the abs() for double, etc. are not in std for VC++. Even
> so it's kind of funny that the using clause hides the abs's
> in the global namespace.
>
> And you can't just tell a user to be careful because he's not the one
> writing generic algorithms with abs() in, I am. (for instance, MTL has
> a generic "one_norm" function using std::accumulate that will work for
> all numeric types, including double and complex)
>
> If anyone knows of any other workarounds I'd be obliged! :)

You could buy the updated MSVC library from Dinkumware, or you could try the
current STLport beta (www.stlport.org). We're still shaking out a few bugs,
but it's basically a complete portable free standard library. It'll probably
take a little configuring on your part, though ;)

-Dave


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