[RISCV] Fix mgather -> riscv.masked.strided.load combine not extending indices (...
[llvm-project.git] / libcxx / test / std / thread / futures / futures.task / futures.task.members / ctor2.compile.pass.cpp
blob3ab59909cfafbe396cf4f2f74870628a6d50576a
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-exception
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // UNSUPPORTED: no-threads
11 // <future>
13 // class packaged_task<R(ArgTypes...)>
14 // template <class F, class Allocator>
15 // packaged_task(allocator_arg_t, const Allocator& a, F&& f);
16 // These constructors shall not participate in overload resolution if
17 // decay<F>::type is the same type as std::packaged_task<R(ArgTypes...)>.
19 #include <cassert>
20 #include <future>
22 #include "test_allocator.h"
24 struct A {};
25 using PT = std::packaged_task<A(int, char)>;
26 using VPT = volatile std::packaged_task<A(int, char)>;
28 static_assert(!std::is_constructible<PT, std::allocator_arg_t, test_allocator<A>, VPT>::value, "");
30 using PA = std::packaged_task<A(int)>;
31 using PI = std::packaged_task<int(int)>;
33 static_assert(!std::is_constructible<PA, std::allocator_arg_t, std::allocator<A>, const PA&>::value, "");
34 static_assert(!std::is_constructible<PA, std::allocator_arg_t, std::allocator<A>, const PA&&>::value, "");
35 static_assert(!std::is_constructible<PA, std::allocator_arg_t, std::allocator<A>, volatile PA&>::value, "");
36 static_assert(!std::is_constructible<PA, std::allocator_arg_t, std::allocator<A>, volatile PA&&>::value, "");
38 static_assert( std::is_constructible<PA, std::allocator_arg_t, std::allocator<A>, const PI&>::value, "");
39 static_assert( std::is_constructible<PA, std::allocator_arg_t, std::allocator<A>, const PI&&>::value, "");
40 static_assert( std::is_constructible<PA, std::allocator_arg_t, std::allocator<A>, volatile PI&>::value, "");
41 static_assert( std::is_constructible<PA, std::allocator_arg_t, std::allocator<A>, volatile PI&&>::value, "");