//===----------------------------------------------------------------------===// // // 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 // SPDX-FileCopyrightText: Copyright (c) 2023 NVIDIA CORPORATION & AFFILIATES. // //===----------------------------------------------------------------------===// // template // concept destructible = is_nothrow_destructible_v; #include #include struct Empty {}; struct Defaulted { ~Defaulted() = default; }; struct Deleted { ~Deleted() = delete; }; struct Noexcept { __host__ __device__ ~Noexcept() noexcept; }; struct NoexceptTrue { __host__ __device__ ~NoexceptTrue() noexcept(true); }; struct NoexceptFalse { __host__ __device__ ~NoexceptFalse() noexcept(false); }; struct Protected { protected: ~Protected() = default; }; struct Private { private: ~Private() = default; }; template struct NoexceptDependant { __host__ __device__ ~NoexceptDependant() noexcept(cuda::std::is_same_v); }; template __host__ __device__ void test() { static_assert(cuda::std::destructible == cuda::std::is_nothrow_destructible_v, ""); } __host__ __device__ void test() { test(); test(); test(); test(); test(); test(); test(); test(); test>(); test>(); test(); test(); test(); test(); } // Required for MSVC internal test runner compatibility. int main(int, char**) { return 0; }