From: Gabriel Dos Reis (dosreis_at_[hidden])
Date: 1999-12-10 23:00:55
| Here's a small example that breaks with VC++ 6.0 sp3.
| #include <complex>
| int main(int,char*)
| using std::abs;
| 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.
Being able to correcly handle siuch benign program is a necessary
condition to be usable with more advanced libraries.
As to Darin's case, there is no problem as it eventually appears.
Concerning abs() for rational<T>, not just some compilers are badly
broken you should start writing^W popularizing unrecommendable habits
(we should not forget that boost will be considered as a reference).
| 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)
I stand to be corrected: you should be careful when you write a
generic algorithms :)
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk