[RISCV] Fix mgather -> riscv.masked.strided.load combine not extending indices (...
[llvm-project.git] / libcxx / test / std / thread / futures / futures.task / futures.task.members / ctad.static.compile.pass.cpp
blob73f6c44125765694cace89edee5a9ec04ff87284
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 //===----------------------------------------------------------------------===//
9 // UNSUPPORTED: no-threads
10 // UNSUPPORTED: c++03, c++11, c++14, c++17, c++20
12 // checks that CTAD for std::packaged_task works properly with static operator() overloads
14 #include <future>
15 #include <type_traits>
17 struct Except {
18 static int operator()(int*, long*) { return 0; }
20 static_assert(std::is_same_v<decltype(std::packaged_task{Except{}}), std::packaged_task<int(int*, long*)>>);
22 struct Noexcept {
23 static int operator()(int*, long*) noexcept { return 0; }
25 static_assert(std::is_same_v<decltype(std::packaged_task{Noexcept{}}), std::packaged_task<int(int*, long*)>>);