1 //===----------------------------------------------------------------------===//
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
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
15 #include <type_traits>
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*)>>);
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*)>>);