Peter Kümmel wrote:
> Jean-Marc Lasgouttes wrote:
>> But are we sure that int is a wide enough type?
> 
> there is no abs function for 64 bit ints,
> so we must define it:
> 
> Index: changes.C
> ===================================================================
> --- changes.C   (revision 15576)
> +++ changes.C   (working copy)
> @@ -18,6 +18,15 @@
> 
>  #include <boost/assert.hpp>
> 
> +#ifdef _MSC_VER
> +namespace std
> +{
> +       inline __int64  abs(__int64 i)
> +       {
> +               return _abs64(i);
> +       }
> +}
> +#endif
> 

A other -but more ugly- solution is (at least in this file)

#ifdef _MSC_VER
#define abs _abs64
namespace std
{
        using ::abs;
}
#endif

because there is
1. no 64bit abs, so use always the 64bit version
2. abs is not a function of std

Peter

Reply via email to