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: Jaroslav Hajek
Subject: Re: MSVC compilation problem: std::abs<int64_t> does not exist
Date: Thu, 30 Oct 2008 19:41:55 +0100

On Thu, Oct 30, 2008 at 7:30 PM, John W. Eaton <address@hidden> wrote:
> 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.
>

OK, good point. I'll revert to the original idea, then.


-- 
RNDr. Jaroslav Hajek
computing expert
Aeronautical Research and Test Institute (VZLU)
Prague, Czech Republic
url: www.highegg.matfyz.cz


reply via email to

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