Hi
An Idea how to fix the following?
MainTask.cpp: In member function ‘virtual void n71A10890::MainTask::init()’:
MainTask.cpp:90: error: no matching function for call to ‘boost::thread::swap(boost::thread)’
/usr/include/boost/thread/pthread/thread.hpp:165: note: candidates are: void boost::thread::swap(boost::thread&)
The problem here is, that the boost::thread is an temporary which can't be used as non-const reference
Getting it to compile with following patch
diff -u a/MainTask.cpp b/MainTask.cpp
--- a/MainTask.cpp 2008-07-27 14:25:42.000000000 +0200
+++ b/MainTask.cpp 2008-08-01 18:02:55.000000000 +0200
@@ -83,11 +83,8 @@
bindings.close();
renderTask = new RenderTask_t(window,game);
- renderThread.swap(
- boost::thread(
- boost::bind(&GameTask::run,renderTask)
- )
- );
+ boost::thread thr(boost::bind(&GameTask::run,renderTask));
+ renderThread.swap(thr);
accumulator = 0.f;
clock.Reset();