|
Boost : |
From: Darin Adler (darin_at_[hidden])
Date: 1999-12-10 17:10:30
> So the letter of the law makes it illegal, but was this really the
> intention? Seems to me this causes nasty problems for generic
> libraries. Since std::abs() is not all-applicable, it forces
> the *user* to do "using std::abs;" etc, for every operation
> of this nature that is used in the algorithm. What if the algorithm
> is large and there are lots of these? Nasty barrier to reuse...
In a template function definition, it seems that you could put "using
std::abs" inside the function scope and then call abs(), instead of calling
std::abs() directly. Would that work?
I think the reason that std::abs is not a function template is the fact that
it comes from the C header <math.h>/<cmath>.
If the workaround above won't work, I think it's worthwhile to write a
defect report.
-- Darin
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk