blob: 458826e956e12c2f3606402f165f2036e4257014 [file] [log] [blame]
Howard Hinnantf39daa82010-08-28 21:01:06 +00001//===----------------------------------------------------------------------===//
2//
3// The LLVM Compiler Infrastructure
4//
Howard Hinnantb64f8b02010-11-16 22:09:02 +00005// This file is dual licensed under the MIT and the University of Illinois Open
6// Source Licenses. See LICENSE.TXT for details.
Howard Hinnantf39daa82010-08-28 21:01:06 +00007//
8//===----------------------------------------------------------------------===//
Jonathan Roelofs8d86b2e2014-09-05 19:45:05 +00009//
10// UNSUPPORTED: libcpp-has-no-threads
Howard Hinnantf39daa82010-08-28 21:01:06 +000011
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 Albert1d4a1ed2016-05-25 22:36:09 -070021#include "../test_allocator.h"
Howard Hinnantf39daa82010-08-28 21:01:06 +000022
23int 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}