Boost logo

Boost-Commit :

From: anthony_at_[hidden]
Date: 2008-05-29 11:36:52


Author: anthonyw
Date: 2008-05-29 11:36:52 EDT (Thu, 29 May 2008)
New Revision: 45911
URL: http://svn.boost.org/trac/boost/changeset/45911

Log:
Don't construct function objects directly in boost::thread constructor as some compilers can't handle that.
Text files modified:
   trunk/libs/thread/test/test_thread_launching.cpp | 6 ++++--
   1 files changed, 4 insertions(+), 2 deletions(-)

Modified: trunk/libs/thread/test/test_thread_launching.cpp
==============================================================================
--- trunk/libs/thread/test/test_thread_launching.cpp (original)
+++ trunk/libs/thread/test/test_thread_launching.cpp 2008-05-29 11:36:52 EDT (Thu, 29 May 2008)
@@ -143,8 +143,10 @@
     {
         x.push_back(i*i);
     }
+
+ callable_multiple_arg func;
     
- boost::thread callable3(callable_multiple_arg(),"hello",x,1.2);
+ boost::thread callable3(func,"hello",x,1.2);
     callable3.join();
     BOOST_CHECK(callable_multiple_arg::called_three);
     BOOST_CHECK_EQUAL(callable_multiple_arg::called_three_arg1,"hello");
@@ -158,7 +160,7 @@
 
     double const dbl=1.234;
     
- boost::thread callable2(callable_multiple_arg(),19,dbl);
+ boost::thread callable2(func,19,dbl);
     callable2.join();
     BOOST_CHECK(callable_multiple_arg::called_two);
     BOOST_CHECK_EQUAL(callable_multiple_arg::called_two_arg1,19);


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk