none_pass.cpp 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. //===----------------------------------------------------------------------===//
  2. //
  3. // The LLVM Compiler Infrastructure
  4. //
  5. // This file is dual licensed under the MIT and the University of Illinois Open
  6. // Source Licenses. See LICENSE.TXT for details.
  7. //
  8. //===----------------------------------------------------------------------===//
  9. // Copyright (C) 2014 Vicente J. Botet Escriba
  10. //
  11. // Distributed under the Boost Software License, Version 1.0. (See accompanying
  12. // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  13. // <boost/thread/future.hpp>
  14. // future<tuple<>> when_any();
  15. #include <boost/config.hpp>
  16. #if ! defined BOOST_NO_CXX11_DECLTYPE
  17. #define BOOST_RESULT_OF_USE_DECLTYPE
  18. #endif
  19. #define BOOST_THREAD_VERSION 4
  20. #include <boost/thread/future.hpp>
  21. #include <boost/detail/lightweight_test.hpp>
  22. int main()
  23. {
  24. #if defined BOOST_THREAD_PROVIDES_FUTURE_WHEN_ALL_WHEN_ANY
  25. {
  26. boost::future<boost::csbl::tuple<> > all = boost::when_any();
  27. BOOST_TEST(all.valid());
  28. BOOST_TEST(all.is_ready());
  29. }
  30. #endif
  31. return boost::report_errors();
  32. }