test_11266.cpp 621 B

1234567891011121314151617181920212223242526272829
  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. #define BOOST_THREAD_VERSION 4
  6. #include <boost/thread/future.hpp>
  7. void func(int) { }
  8. int main()
  9. {
  10. #if defined BOOST_THREAD_PROVIDES_SIGNATURE_PACKAGED_TASK && defined(BOOST_THREAD_PROVIDES_VARIADIC_THREAD)
  11. {
  12. boost::packaged_task<void(int)> task{func};
  13. }
  14. {
  15. boost::packaged_task<void(int)> task{func};
  16. task(0);
  17. }
  18. {
  19. boost::packaged_task<void(int)> task{func};
  20. int x = 0;
  21. task(x);
  22. }
  23. #endif
  24. }