Imported Upstream version 1.57.0
[platform/upstream/boost.git] / libs / thread / test / test_thread_return_local.cpp
index be2aec5..46e84a7 100644 (file)
@@ -1,8 +1,11 @@
 // Copyright (C) 2009 Anthony Williams
 //
-//  Distributed under the Boost Software License, Version 1.0. (See accompanying 
+//  Distributed under the Boost Software License, Version 1.0. (See accompanying
 //  file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-#include <boost/thread/thread.hpp>
+
+#define BOOST_THREAD_USES_MOVE
+
+#include <boost/thread/thread_only.hpp>
 #include <boost/test/unit_test.hpp>
 
 void do_nothing(boost::thread::id* my_id)
@@ -13,7 +16,7 @@ void do_nothing(boost::thread::id* my_id)
 boost::thread make_thread_return_local(boost::thread::id* the_id)
 {
     boost::thread t(do_nothing,the_id);
-    return t;
+    return boost::move(t);
 }
 
 void test_move_from_function_return_local()
@@ -33,3 +36,5 @@ boost::unit_test::test_suite* init_unit_test_suite(int, char*[])
     test->add(BOOST_TEST_CASE(test_move_from_function_return_local));
     return test;
 }
+
+