]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/thread/test/threads/thread/constr/Frvalue_pass.cpp
1 //===----------------------------------------------------------------------===//
3 // The LLVM Compiler Infrastructure
5 // This file is dual licensed under the MIT and the University of Illinois Open
6 // Source Licenses. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
9 // Copyright (C) 2011 Vicente J. Botet Escriba
11 // Distributed under the Boost Software License, Version 1.0. (See accompanying
12 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
14 // <boost/thread/thread.hpp>
18 // template <class F, class ...Args> thread(F&& f, Args&&... args);
20 #define BOOST_THREAD_USES_MOVE
22 #include <boost/thread/thread_only.hpp>
26 #include <boost/detail/lightweight_test.hpp>
27 #include <boost/static_assert.hpp>
32 BOOST_THREAD_MOVABLE_ONLY(MoveOnly
)
36 MoveOnly(BOOST_THREAD_RV_REF(MoveOnly
))
44 MoveOnly
MakeMoveOnly() {
45 return BOOST_THREAD_MAKE_RV_REF(MoveOnly());
48 #if defined BOOST_NO_CXX11_RVALUE_REFERENCES && defined BOOST_THREAD_USES_MOVE
49 BOOST_STATIC_ASSERT(::boost::is_function
<boost::rv
<boost::rv
<MoveOnly
> >&>::value
==false);
55 boost::thread
t(( BOOST_THREAD_MAKE_RV_REF(MakeMoveOnly()) ));
58 return boost::report_errors();