| //===----------------------------------------------------------------------===// |
| // 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 |
| //===----------------------------------------------------------------------===// |
| // XFAIL: FROZEN-CXX03-HEADERS-FIXME |
| #include <__utility/no_destroy.h> |
| // Test constexpr-constructibility. |
| constinit std::__no_destroy<int> nd_int_const(std::__uninitialized_tag{}); |
| ~DestroyLast() { assert(*ptr == 5); } |
| static std::__no_destroy<int> nd_int(5); |
| last.ptr = &nd_int.__get(); |