//===----------------------------------------------------------------------===// // // 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 // checks that CTAD works properly #include #include int func(char*); static_assert(std::is_same_v>); int funcn(char*) noexcept; static_assert(std::is_same_v>); template struct Callable { int operator()(char*) noexcept(Noexcept); }; static_assert(std::is_same_v{}}), std::packaged_task>); static_assert(std::is_same_v{}}), std::packaged_task>); template struct CallableC { int operator()(char*) const noexcept(Noexcept); }; static_assert(std::is_same_v{}}), std::packaged_task>); static_assert(std::is_same_v{}}), std::packaged_task>); template struct CallableV { int operator()(char*) const noexcept(Noexcept); }; static_assert(std::is_same_v{}}), std::packaged_task>); static_assert(std::is_same_v{}}), std::packaged_task>); template struct CallableCV { int operator()(char*) const volatile noexcept(Noexcept); }; static_assert(std::is_same_v{}}), std::packaged_task>); static_assert(std::is_same_v{}}), std::packaged_task>); template struct CallableL { int operator()(char*) & noexcept(Noexcept); }; static_assert(std::is_same_v{}}), std::packaged_task>); static_assert(std::is_same_v{}}), std::packaged_task>); template struct CallableCL { int operator()(char*) const & noexcept(Noexcept); }; static_assert(std::is_same_v{}}), std::packaged_task>); static_assert(std::is_same_v{}}), std::packaged_task>); template struct CallableVL { int operator()(char*) const noexcept(Noexcept); }; static_assert(std::is_same_v{}}), std::packaged_task>); static_assert(std::is_same_v{}}), std::packaged_task>); template struct CallableCVL { int operator()(char*) const volatile & noexcept(Noexcept); }; static_assert(std::is_same_v{}}), std::packaged_task>); static_assert(std::is_same_v{}}), std::packaged_task>);