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 //===----------------------------------------------------------------------===//
14 // public: // All of these are constexpr after C++17
15 // allocator() noexcept;
16 // allocator(const allocator&) noexcept;
17 // template<class U> allocator(const allocator<U>&) noexcept;
24 #include "test_macros.h"
27 TEST_CONSTEXPR_CXX20
bool test() {
28 typedef std::allocator
<T
> A1
;
29 typedef std::allocator
<long> A2
;
32 A1 a1_copy
= a1
; (void)a1_copy
;
38 int main(int, char**) {
44 static_assert(test
<char>());
45 static_assert(test
<int>());
46 static_assert(test
<void>());