$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
Subject: Re: [boost] [config] gcc-4.8 and __GXX_EXPERIMENTAL_CXX0X__
From: Vicente J. Botet Escriba (vicente.botet_at_[hidden])
Date: 2013-04-01 10:58:24
Le 01/04/13 16:35, Jonathan Wakely a écrit :
> On 1 April 2013 15:17, Vicente J. Botet Escriba wrote:
>> Hi,
>>
>> it seems that gcc-4.8 doesn't defines any more __GXX_EXPERIMENTAL_CXX0X__
>> when the flag -std=c++11 is given.
> Are you sure?
Maybe my installation is not correct, but with it
__GXX_EXPERIMENTAL_CXX0X__ is not defined. Could some check it?
BTW, there are some pages pointing to this problem on the net.
> The standard library no longer checks it, using __cplusplus >= 201103L
> instead, but the compiler still defines the old macro. The old macro
> is still documented as being defined.
Maybe there is a bug on gcc-4.8 ;-)
>
>> This means that all the BOOST_NO_CXX11_ are defined.
>>
>> Could something be done to make usable gcc-4.8 in c++11 mode?
> You could check the value of __cplusplus instead, because
> __GXX_EXPERIMENTAL_CXX0X__ will stop being defined at some point
> eventually.
I'm not using it directly, but via boost/config.hpp
>
> A related topic I've been meaning to raise is that
> <boost/config/stdlib/libstdcpp3.hpp> unconditionally defines:
>
> // C++0x headers not yet (fully!) implemented
> //
> # define BOOST_NO_CXX11_HDR_THREAD
>
> This is incorrect. Depending on how GCC was configured libstdc++ has
> provided a complete <thread> since at least version 4.4, and for GCC
> 4.8 it unconditionally provides a complete <thread>.
>
> This should be correct:
>
> #if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 4)
> # define BOOST_NO_CXX11_HDR_THREAD
> #elif (__GNUC__ == 4 && __GNUC_MINOR__ < 8)
> # if !(defined(_GLIBCXX_HAS_GTHREADS) &&
> defined(_GLIBCXX_USE_C99_STDINT_TR1) &&
> defined(_GLIBCXX_USE_SCHED_YIELD) && defined(_GLIBCXX_USE_NANOSLEEP)
> && defined(__GXX_EXPERIMENTAL_CXX0X__))
> # define BOOST_NO_CXX11_HDR_THREAD
> #elif __cplusplus < 201103L
> # define BOOST_NO_CXX11_HDR_THREAD
> #endif
>
>
I don't know if some documentation needs to be updated, but if you have
check it, could you to commit it?
Best,
Vicente