Hi,
When I compile the example on the boost::thread documentation
(the source is wrapped by a main function):
#include
#include
/*
*
*/
int main(int argc, char** argv) {
boost::system_time const timeout = boost::get_system_time() +
boost::posix_time::milliseconds(500);
extern bool done;
extern boost::mutex m;
extern boost::condition_variable cond;
boost::unique_lockboost::mutex lk(m);
while (!done)
{
if (!cond.timed_wait(lk, timeout))
{
throw "timed out";
}
}
boost::
return (EXIT_SUCCESS);
}
I get the error
CC -library=stlport4 -mt -c -g -I/opt/boost/boost_1_39_0 -o
build/Debug/SunStudio-Solaris-x86/thread.o thread.cpp
"/opt/boost/boost_1_39_0/boost/thread/detail/thread.hpp", line 344: Error:
boost::thread::thread(boost::thread&) is not accessible from
boost::move(boost::detail::thread_move_tboost::thread).
1 Error(s) detected.
So could anyone tell me how to bypass this error, or should the library
be updated?
-Roman