octave-maintainers
[Top][All Lists]
Advanced

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

Fwd: Potentially "dangerous" changeset, please test


From: Michael Goffioul
Subject: Fwd: Potentially "dangerous" changeset, please test
Date: Fri, 7 Oct 2011 09:40:36 +0100

---------- Forwarded message ----------
From: Michael Goffioul <address@hidden>
Date: 2011/10/7
Subject: Re: Potentially "dangerous" changeset, please test
To: Jordi Gutiérrez Hermoso <address@hidden>


2011/10/6 Jordi Gutiérrez Hermoso <address@hidden>:
> 2011/10/6 Michael Goffioul <address@hidden>:
>
>> As I suspected, the change above fails to compile under MSVC, because
>> the header to include is <unordered_map>, not <tr1/unordered_map>.
>> In C++11, the header to include is also <unordered_map>. So I suggest
>> you write a configure test to check for the header location and namespace
>> to use.
>
> If you know how to do this, could you please do it yourself? If not,
> please wait until I figure out how. :-)

It's not really that I don't know how to do it, but that I don't have much
time to try and test it (a full "./autogen.sh + ./configure + make" cycle
takes a few hours on my system).

But you could try this for the header location(untested):

AC_CHECK_HEADERS([unordered_map], [], [
 AC_CHECK_HEADERS([tr1/unordered_map]))

Then in rand.cc, you should be able to use (check config.h for the correct
macro names)

#if defined (HAVE_UNORDERED_MAP)
#include <unordered_map>
#elif defined (HAVE_TR1_UNORDERED_MAP)
#include <tr1/unordered_map>
#endif

Michael.


reply via email to

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