]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/thread/test/sync/futures/shared_future/copy_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)
15 // <boost/thread/future.hpp>
17 // class shared_future<R>
19 // shared_future& operator=(const shared_future&);
22 #define BOOST_THREAD_VERSION 3
23 #include <boost/thread/future.hpp>
24 #include <boost/detail/lightweight_test.hpp>
31 boost::shared_future
<T
> f0((p
.get_future()));
32 boost::shared_future
<T
> f
;
34 BOOST_TEST(f0
.valid());
35 BOOST_TEST(f
.valid());
40 boost::shared_future
<T
> f0
;
41 boost::shared_future
<T
> f
;
43 BOOST_TEST(!f0
.valid());
44 BOOST_TEST(!f
.valid());
49 boost::shared_future
<T
> f0((p
.get_future()));
50 boost::shared_future
<T
> f
;
52 BOOST_TEST(f0
.valid());
53 BOOST_TEST(f
.valid());
57 boost::shared_future
<T
> f0
;
58 boost::shared_future
<T
> f
;
60 BOOST_TEST(!f0
.valid());
61 BOOST_TEST(!f
.valid());
66 boost::shared_future
<T
> f0((p
.get_future()));
67 boost::shared_future
<T
> f
;
69 BOOST_TEST(f0
.valid());
70 BOOST_TEST(f
.valid());
74 boost::shared_future
<T
> f0
;
75 boost::shared_future
<T
> f
;
77 BOOST_TEST(!f0
.valid());
78 BOOST_TEST(!f
.valid());
81 return boost::report_errors();
84 //#include "../../../remove_error_code_unused_warning.hpp"