Files
clang-p2996/libcxx/test/std/thread/futures/futures.task/futures.task.members/ctad.static.compile.pass.cpp
Louis Dionne 580d26ae46 [libc++] Remove the CI job testing Clang 15 (#66406)
Since LLVM 17 has been branched and is on the verge of being released,
we can drop the CI job that tests against Clang 15. I think the number
of cherry-picks to `release/17.x` will be a lot smaller now, so keeping
a Clang 15 job around for that purpose seems unnecessary.

As a fly-by, this patch also removes some Clang 15 workarounds and test
suite annotations as we usually do. It also removes some slightly older
gcc test suite annotations that were missed.
2023-09-25 17:55:59 -04:00

26 lines
954 B
C++

//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
// UNSUPPORTED: no-threads
// UNSUPPORTED: c++03, c++11, c++14, c++17, c++20
// checks that CTAD for std::packaged_task works properly with static operator() overloads
#include <future>
#include <type_traits>
struct Except {
static int operator()(int*, long*) { return 0; }
};
static_assert(std::is_same_v<decltype(std::packaged_task{Except{}}), std::packaged_task<int(int*, long*)>>);
struct Noexcept {
static int operator()(int*, long*) noexcept { return 0; }
};
static_assert(std::is_same_v<decltype(std::packaged_task{Noexcept{}}), std::packaged_task<int(int*, long*)>>);