]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/thread/test/test_8674.cpp
1 // Copyright (C) 2013 Vicente Botet
3 // Distributed under the Boost Software License, Version 1.0. (See accompanying
4 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
11 #define USED_THREAD_API USE_BOOST
12 //#define USED_THREAD_API USE_STD
14 #if USED_THREAD_API == USE_BOOST
16 # define BOOST_THREAD_VERSION 4
17 # include <boost/thread/future.hpp>
23 #if USED_THREAD_API == USE_STD
31 future
<void> do_something()
33 auto result
= async( []{ std::cout
<< "A\n"; } );
35 return result
; // error here
40 do_something().wait();
41 std::cout
<< "Hello, World!" << std::endl
;