Boost logo

Boost :

Subject: Re: [boost] Are some of the trunk regression tests running in C++0x mode when they shouldn't be?
From: Christopher Jefferson (chris_at_[hidden])
Date: 2011-11-10 18:37:46


On 10 Nov 2011, at 23:30, Gennadiy Rozental wrote:

> Vicente J. Botet Escriba <vicente.botet <at> wanadoo.fr> writes:
>
>>
>> Le 10/11/11 21:13, Gennadiy Rozental a écrit :
>>> Steven Watanabe<watanabesj<at> gmail.com> writes:
>>>>> Looks like -std=c++0x is being specified when it shouldn't for some reason?
>>>>> Is something broken, or am i imagining it?
>>>>>
>>>> This is a problem in Boost.Test as of r75372.
>>> How should I specify in Jamfile that I want to require c++11 support from gcc
>>> starting with version a.b.c?
>>>
>> You should not require this. Even if using a given version of gcc, users
>> could been to preserve a C++03 behavior.
>
> What is the problem with enabling C++11 features if possible? We do not expect
> backward compatibility issues, don't we?
>
> What about MSVC? It has C++11 enabled by default.
>
> Some of the new features of Boost.Test require c++11 support. I want to be able
> to test it and I want users to be able to use it.

There are two problems with enabling C++11 unconditionally in gcc:

1) It breaks binary compatability of some stl containers
2) Different versions of gcc support different amounts of C++11. In particular, there are at least 2 (maybe 3?) different semantics for rvalue references floating around. In general, I would advise only trying to use boost in C++11 mode in g++ 4.5 at least. I don't think it's worth the effort to make boost work with each of the early partial implementations floating around in the various compilers.

Chris


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk