Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r80323 - trunk/libs/thread/test
From: vicente.botet_at_[hidden]
Date: 2012-08-30 13:30:26


Author: viboes
Date: 2012-08-30 13:30:25 EDT (Thu, 30 Aug 2012)
New Revision: 80323
URL: http://svn.boost.org/trac/boost/changeset/80323

Log:
Thread: Avoid ambiguity on thread symbol
Text files modified:
   trunk/libs/thread/test/test_7328.cpp | 8 ++++----
   1 files changed, 4 insertions(+), 4 deletions(-)

Modified: trunk/libs/thread/test/test_7328.cpp
==============================================================================
--- trunk/libs/thread/test/test_7328.cpp (original)
+++ trunk/libs/thread/test/test_7328.cpp 2012-08-30 13:30:25 EDT (Thu, 30 Aug 2012)
@@ -7,7 +7,7 @@
 #include <boost/thread.hpp>
 #include <boost/detail/lightweight_test.hpp>
 
-using namespace boost;
+//using namespace boost;
 using namespace boost::chrono;
 
 bool interrupted = false;
@@ -18,10 +18,10 @@
     std::cout << "Starting sleep in thread" << std::endl;
     while (true)
     {
- this_thread::sleep_for(seconds(60));
+ boost::this_thread::sleep_for(seconds(60));
     }
   }
- catch (const thread_interrupted&)
+ catch (const boost::thread_interrupted&)
   {
     interrupted = true;
     std::cout << "Thread interrupted." << std::endl;
@@ -30,7 +30,7 @@
 
 int main()
 {
- thread t(f);
+ boost::thread t(f);
   t.interrupt();
   t.join();
   std::cout << "Joined with thread." << std::endl;


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