monotone-devel
[Top][All Lists]
Advanced

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

Re: [Monotone-devel] C++11


From: Stephen Leake
Subject: Re: [Monotone-devel] C++11
Date: Fri, 16 May 2014 05:43:42 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (windows-nt)

Markus Wanner <address@hidden> writes:

> On 05/15/2014 09:18 PM, Stephen Leake wrote:
>> gcc --version
>> gcc (GCC) 4.7.4 20131104 for GNAT Pro 7.2.1 (20140108)
>
> for GNAT Pro?!?

yes; it's for my day job, we pay for AdaCore support.

I'm not suggesting it as a general solution for mtn on Red Hat 6, but it
works for me.

>> In file included from ../mandatory-cxx11/src/globish.cc:14:0:
>> ../mandatory-cxx11/src/option.hh: In member function
>> option::option_set<T> option::option_set<T>::operator|(const
>> option::option_set<T>&) const':
>> ../mandatory-cxx11/src/option.hh:332:7: error: 'set_union' is not a
>> member of 'std'

> Does that g++ version compile plain nvm? That's is using the very same
> standard library functions from <algorithm>...

But options.hh does not have "#include <algorithm> ". Adding that fixes
the problem; mtn compiles (tests running ...).

Apparently "#include <algorithm>" is implied somehow, or included in
another include file, in nvm? 

Or it's actually a bug in older versions of the g++ std library, now
fixed in 4.7.4.

>> Also, I notice you are using -std=gnu++11; shouldn't that be
>> -std=iso9899:2011, so we don't rely on gnu extensions?
>
> The m4 script is supposed to use -std=gnu++11 only if -std=c++11 is not
> supported. I haven't ever seen -std=iso9899:2011, before, but certainly
> prefer the shorter variant.

I found it from 'g++ -v --help'

> Does your g++ support -std=c++11? 

Yes (it's in the same help listing).

> If so, it looks like the m4 macro is failing to do its job properly.

config.log says it checks 'g++' first (default language version), then
'g++ -std=gnu++11', and that works, so it is used.

So yes, this is a bug in the m4 macro.

--
-- Stephe



reply via email to

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