|
Boost Users : |
Subject: Re: [Boost-users] [STL] Is there a std::abs<>() function? (Max)
From: Scott McMurray (me22.ca+boost_at_[hidden])
Date: 2008-12-22 23:42:48
On Mon, Dec 22, 2008 at 21:06, Max <loadcom_at_[hidden]> wrote:
>
> What I need is a template version of abs, not the
> int abs(int) function, to make use of it genericly.
>
Do you really need a template of it? I can't see why using ADL
wouldn't be enough (with a using declaration for std::abs, to catch
the overloads for scalars from <cstdlib> and <cmath>).
~ Scott
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net