| //===----------------------------------------------------------------------===// |
| // 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 |
| //===----------------------------------------------------------------------===// |
| // template <class Alloc> |
| // struct allocator_traits |
| // static void destroy(allocator_type& a, Ptr p); |
| #include "incomplete_type_helper.h" |
| std::aligned_storage<sizeof(A0)>::type a0; |
| std::allocator_traits<A<int> >::construct(a, (A0*)&a0); |
| std::allocator_traits<A<int> >::destroy(a, (A0*)&a0); |
| typedef IncompleteHolder* VT; |
| std::aligned_storage<sizeof(VT)>::type store; |
| std::allocator_traits<Alloc>::destroy(a, (VT*)&store); |
| #if defined(_LIBCPP_VERSION) || TEST_STD_VER >= 11 |
| std::aligned_storage<sizeof(A0)>::type a0; |
| std::allocator_traits<B<int> >::construct(b, (A0*)&a0); |
| std::allocator_traits<B<int> >::destroy(b, (A0*)&a0); |