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 packaged_task<R(ArgTypes...)>
19 // template <class Callable, class Alloc>
20 // struct uses_allocator<packaged_task<Callable>, Alloc>
24 #define BOOST_THREAD_VERSION 4
25 #if BOOST_THREAD_VERSION == 4
26 #define BOOST_THREAD_DETAIL_SIGNATURE double()
28 #define BOOST_THREAD_DETAIL_SIGNATURE double
31 #include <boost/thread/future.hpp>
32 #include <boost/detail/lightweight_test.hpp>
33 #include <boost/static_assert.hpp>
35 #if defined BOOST_THREAD_PROVIDES_FUTURE_CTOR_ALLOCATORS
36 #include "../test_allocator.hpp"
41 BOOST_STATIC_ASSERT_MSG((boost::csbl::uses_allocator<boost::packaged_task<BOOST_THREAD_DETAIL_SIGNATURE>, test_allocator<double> >::value), "");
43 return boost::report_errors();
49 return boost::report_errors();