|
Boost Users : |
Subject: [Boost-users] boost::thread Compile error with Sun Studio 12
From: Roman Morokutti (roman.morokutti_at_[hidden])
Date: 2009-05-14 17:29:55
Hi,
When I compile the example on the boost::thread documentation
(the source is wrapped by a main function):
#include <stdlib.h>
#include <boost/thread.hpp>
/*
*
*/
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_lock<boost::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_t<boost::thread>).
1 Error(s) detected.
So could anyone tell me how to bypass this error, or should the library
be updated?
-Roman
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net