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 // 10 // UNSUPPORTED: libcpp-has-no-threads 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> 21 #include "test_allocator.h" 22 main()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 } 29