]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/thread/test/sync/futures/shared_future/move_assign_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 //===----------------------------------------------------------------------===//
10 // Copyright (C) 2011 Vicente J. Botet Escriba
12 // Distributed under the Boost Software License, Version 1.0. (See accompanying
13 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
17 // class shared_future<R>
19 // shared_future& shared_future=(shared_future&& rhs);
21 #define BOOST_THREAD_VERSION 3
23 #include <boost/thread/future.hpp>
24 #include <boost/detail/lightweight_test.hpp>
34 boost::shared_future
<T
> f0
= BOOST_THREAD_MAKE_RV_REF(p
.get_future());
35 boost::shared_future
<T
> f
;
37 BOOST_TEST(!f0
.valid());
38 BOOST_TEST(f
.valid());
42 boost::shared_future
<T
> f0
;
43 boost::shared_future
<T
> f
;
45 BOOST_TEST(!f0
.valid());
46 BOOST_TEST(!f
.valid());
51 boost::shared_future
<T
> f0
= BOOST_THREAD_MAKE_RV_REF(p
.get_future());
52 boost::shared_future
<T
> f
;
54 BOOST_TEST(!f0
.valid());
55 BOOST_TEST(f
.valid());
59 boost::shared_future
<T
> f0
;
60 boost::shared_future
<T
> f
;
62 BOOST_TEST(!f0
.valid());
63 BOOST_TEST(!f
.valid());
68 boost::shared_future
<T
> f0
= BOOST_THREAD_MAKE_RV_REF(p
.get_future());
69 boost::shared_future
<T
> f
;
71 BOOST_TEST(!f0
.valid());
72 BOOST_TEST(f
.valid());
76 boost::shared_future
<T
> f0
;
77 boost::shared_future
<T
> f
;
79 BOOST_TEST(!f0
.valid());
80 BOOST_TEST(!f
.valid());
84 return boost::report_errors();