Boost logo

Boost :

Subject: Re: [boost] Boost.Thread 1.52 vs 1.51 - g++ 4.7.2
From: Vicente J. Botet Escriba (vicente.botet_at_[hidden])
Date: 2012-11-20 14:59:04


Le 20/11/12 11:01, Jose a écrit :
> When including thread.hpp (1.52) I get the error below. Same setup but
> Boost 1.51 works ok.
>
> Does anybody know what is the issue ?
>
> thanks
>
>
> # g++ -c test.cpp
> In file included from /usr/include/boost/thread.hpp:24:0,
> from test.cpp:1:
> /usr/include/boost/thread/future.hpp:139:26: error: expected ‘;’ at
> end of member declaration
> /usr/include/boost/thread/future.hpp:139:32: error:
> ‘BOOST_THREAD_NOEXCEPT_OR_THROW’ does not name a type
> /usr/include/boost/thread/future.hpp:139:19: error: looser throw
> specifier for ‘virtual const char* boost::future_error::what() const’
> In file included from /usr/include/boost/thread/exceptions.hpp:21:0,
> from /usr/include/boost/thread/pthread/thread_data.hpp:10,
> from /usr/include/boost/thread/thread.hpp:17,
> from /usr/include/boost/thread.hpp:13,
> from test.cpp:1:
> /usr/lib/gcc/x86_64-redhat-linux/4.7.2/../../../../include/c++/4.7.2/stdexcept:70:5:
> error: overriding ‘virtual const char* std::logic_error::what()
> const throw ()’
>
> _______________________________________________
> Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
>
Hi,

I've replied to you private mail with the following content:

Please, could you verify that in your installation
boost/thread/detail/config.h contains

#ifdef BOOST_NO_NOEXCEPT
# define BOOST_THREAD_NOEXCEPT_OR_THROW throw()
#else
# define BOOST_THREAD_NOEXCEPT_OR_THROW noexcept
#endif

I suspect that you are including a older version of Boost.

Best,
Vicente


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