Howard Hinnant | f39daa8 | 2010-08-28 21:01:06 +0000 | [diff] [blame] | 1 | //===----------------------------------------------------------------------===// |
| 2 | // |
| 3 | // The LLVM Compiler Infrastructure |
| 4 | // |
Howard Hinnant | b64f8b0 | 2010-11-16 22:09:02 +0000 | [diff] [blame] | 5 | // This file is dual licensed under the MIT and the University of Illinois Open |
| 6 | // Source Licenses. See LICENSE.TXT for details. |
Howard Hinnant | f39daa8 | 2010-08-28 21:01:06 +0000 | [diff] [blame] | 7 | // |
| 8 | //===----------------------------------------------------------------------===// |
Jonathan Roelofs | 8d86b2e | 2014-09-05 19:45:05 +0000 | [diff] [blame] | 9 | // |
| 10 | // UNSUPPORTED: libcpp-has-no-threads |
Howard Hinnant | f39daa8 | 2010-08-28 21:01:06 +0000 | [diff] [blame] | 11 | |
| 12 | // <future> |
| 13 | |
| 14 | // class promise<R> |
| 15 | |
| 16 | // template <class R, class Alloc> |
| 17 | // struct uses_allocator<promise<R>, Alloc> |
| 18 | // : true_type { }; |
| 19 | |
| 20 | #include <future> |
Dan Albert | 1d4a1ed | 2016-05-25 22:36:09 -0700 | [diff] [blame^] | 21 | #include "../test_allocator.h" |
Howard Hinnant | f39daa8 | 2010-08-28 21:01:06 +0000 | [diff] [blame] | 22 | |
| 23 | int main() |
| 24 | { |
| 25 | static_assert((std::uses_allocator<std::promise<int>, test_allocator<int> >::value), ""); |
| 26 | static_assert((std::uses_allocator<std::promise<int&>, test_allocator<int> >::value), ""); |
| 27 | static_assert((std::uses_allocator<std::promise<void>, test_allocator<void> >::value), ""); |
| 28 | } |