Re: C++11
Stephen Leake <[email protected]>
| Newsgroups | gmane.comp.version-control.monotone.devel |
|---|---|
| Message-ID | <[email protected]> |
Markus Wanner <[email protected]> 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