
On 9/29/2016 2:07 AM, Andreas Wehrmann wrote:
Hello folks,
I've just wanted to try out the new release and noticed that the Thread library was not building.
Assuming this code:
#include <boost/thread.hpp> int main( void ) { return 0; }
When compiled with -std=c++0x the compilation fails with:
In file included from ./boost/boost_1_62_0/boost/exception/detail/exception_ptr.hpp:20:0, from ./boost/boost_1_62_0/boost/exception_ptr.hpp:9, from ./boost/boost_1_62_0/boost/thread/exceptional_ptr.hpp:10, from ./boost/boost_1_62_0/boost/thread/future.hpp:25, from ./boost/boost_1_62_0/boost/thread.hpp:24, from test.cpp:2: ./boost/boost_1_62_0/boost/exception/info.hpp: In instantiation of ‘boost::error_info<boost::tag_original_exception_type, const std::type_info*>’: ./boost/boost_1_62_0/boost/exception/detail/exception_ptr.hpp:95:32: instantiated from here ./boost/boost_1_62_0/boost/exception/info.hpp:66:5: error: ‘class boost::error_info<boost::tag_original_exception_type, const std::type_info*>’ has no member named ‘value_’ ./boost/boost_1_62_0/boost/container/detail/pair.hpp:85:30: warning: ‘boost::container::piecewise_construct’ defined but not used [-Wunused-variable] ./boost/boost_1_62_0/boost/system/error_code.hpp:221:36: warning: ‘boost::system::posix_category’ defined but not used [-Wunused-variable] ./boost/boost_1_62_0/boost/system/error_code.hpp:222:36: warning: ‘boost::system::errno_ecat’ defined but not used [-Wunused-variable] ./boost/boost_1_62_0/boost/system/error_code.hpp:223:36: warning: ‘boost::system::native_ecat’ defined but not used [-Wunused-variable]
Compilation works if I don't use -std=c++0x. The exact compiler version is "g++ (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3". I'm aware that g++ 4.6.3 is not among the compilers tested for C++11, but it is for pre-Cpp11; I'm wondering if there is a reason for that which I might not be aware of (any known problems?).
This looks like an rvalue references bug in gcc-4.6.3 since error_info definitely has a member named 'value_'.
Best regards, Andreas