monotone-devel
[Top][All Lists]
Advanced

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

Re: [Monotone-devel] C++11


From: Markus Wanner
Subject: Re: [Monotone-devel] C++11
Date: Fri, 16 May 2014 13:33:30 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Icedove/24.4.0

On 05/16/2014 12:43 PM, Stephen Leake wrote:
>> 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 ...).

Good, that means the compiler and standard libraries are just fine,
which I'm glad.

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

Maybe C++11 is more restrictive on including header (or allows the
library to be written so). Sounds like we want to add that include to
nvm as well.

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

Interesting, I thought I tested that. But you're right, this looks like
the macro doesn't do what it's supposed to do. It itself claims:

#   The first argument, if specified, indicates whether you insist on an
#   extended mode (e.g. -std=gnu++11) or a strict conformance mode (e.g.
#   -std=c++11).  If neither is specified, you get whatever works, with
#   preference for an extended mode.

I left it unspecified, as I'm fine with whatever works (tm).

I corrected the order of tests, now. So for gcc, it now yields the c++??
rather than gnu++?? variants.

Regards

Markus Wanner


Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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