brintos

brintos / llvm-project-archived public Read only

0
0
Text · 937 B · 7c859a9 Raw
31 lines · cpp
1//===----------------------------------------------------------------------===//2//3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.4// See https://llvm.org/LICENSE.txt for license information.5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception6//7//===----------------------------------------------------------------------===//8//9// UNSUPPORTED: no-threads10 11// <future>12 13// class promise<R>14 15// template <class R, class Alloc>16//   struct uses_allocator<promise<R>, Alloc>17//      : true_type { };18 19#include <future>20#include "test_macros.h"21#include "test_allocator.h"22 23int main(int, char**)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  return 0;30}31