• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright (C) 2015 Vicente Botet
2 //
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)
5 
6 #define BOOST_THREAD_VERSION 4
7 
8 #include <boost/thread/future.hpp>
9 
func(int)10 void func(int) { }
11 
main()12 int main()
13 {
14 #if defined BOOST_THREAD_PROVIDES_SIGNATURE_PACKAGED_TASK && defined(BOOST_THREAD_PROVIDES_VARIADIC_THREAD)
15   {
16   boost::packaged_task<void(int)> task{func};
17   }
18   {
19     boost::packaged_task<void(int)> task{func};
20 
21     task(0);
22   }
23   {
24     boost::packaged_task<void(int)> task{func};
25     int x = 0;
26     task(x);
27   }
28 #endif
29 }
30