[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: MSVC compilation problem: std::abs<int64_t> does not exist
From: |
Michael Goffioul |
Subject: |
Re: MSVC compilation problem: std::abs<int64_t> does not exist |
Date: |
Thu, 30 Oct 2008 18:18:08 +0000 |
The fix I used up to now is to add
namespace std
{
inline __int64 abs (__int64 x)
{ return (x >= 0 ? x : -x); }
}
in lo-math.h. This is enough to work around the problem.
I surrounded this definition with #ifdef that is only active
for MSVC, so as to not interfere with the other compilers.
Wouldn't that be enough?
Michael.
On Thu, Oct 30, 2008 at 5:59 PM, John W. Eaton <address@hidden> wrote:
> On 30-Oct-2008, Jaroslav Hajek wrote:
>
> | I have just verified that the expression
> | (x < 0) ? -x : x produces exaclty the same code as std::abs (x) with
> | g++ at -O3, so I guess we can use that. But, unless anyone objects,
> | I'll mark it as a FIXME.
>
> It's fine with me.
>
> Thanks,
>
> jwe
>
- MSVC compilation problem: std::abs<int64_t> does not exist, Michael Goffioul, 2008/10/30
- Re: MSVC compilation problem: std::abs<int64_t> does not exist, Abdelrazak Younes, 2008/10/30
- Re: MSVC compilation problem: std::abs<int64_t> does not exist, John W. Eaton, 2008/10/30
- Re: MSVC compilation problem: std::abs<int64_t> does not exist, Abdelrazak Younes, 2008/10/30
- Re: MSVC compilation problem: std::abs<int64_t> does not exist, Jaroslav Hajek, 2008/10/30
- Re: MSVC compilation problem: std::abs<int64_t> does not exist, John W. Eaton, 2008/10/30
- Re: MSVC compilation problem: std::abs<int64_t> does not exist, Jaroslav Hajek, 2008/10/30
- Re: MSVC compilation problem: std::abs<int64_t> does not exist, John W. Eaton, 2008/10/30
- Re: MSVC compilation problem: std::abs<int64_t> does not exist,
Michael Goffioul <=
- Re: MSVC compilation problem: std::abs<int64_t> does not exist, Jaroslav Hajek, 2008/10/30
- Re: MSVC compilation problem: std::abs<int64_t> does not exist, John W. Eaton, 2008/10/30
- Re: MSVC compilation problem: std::abs<int64_t> does not exist, John W. Eaton, 2008/10/30
- Re: MSVC compilation problem: std::abs<int64_t> does not exist, Jaroslav Hajek, 2008/10/30
- Re: MSVC compilation problem: std::abs<int64_t> does not exist, Abdelrazak Younes, 2008/10/30