octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: MSVC compilation problem: std::abs<int64_t> does not exist


From: John W. Eaton
Subject: Re: MSVC compilation problem: std::abs<int64_t> does not exist
Date: Thu, 30 Oct 2008 14:30:27 -0400

On 30-Oct-2008, Michael Goffioul wrote:

| 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?

I would prefer to simply fix it for all systems, or at least use a
configure check for this specific feature rather than simply using
#ifdef MSVC since MSVC could change in the future and require this to
be fixed again.

jwe


reply via email to

[Prev in Thread] Current Thread [Next in Thread]