Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / libcxx / test / std / utilities / memory / default.allocator / allocator.globals / eq.pass.cpp
blob0f568d6cf18b3c77213d5df542d8a6ac19f5e400
1 //===----------------------------------------------------------------------===//
2 //
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
6 //
7 //===----------------------------------------------------------------------===//
9 // <memory>
11 // allocator:
13 // template <class T1, class T2>
14 // constexpr bool
15 // operator==(const allocator<T1>&, const allocator<T2>&) throw();
17 // template <class T1, class T2>
18 // constexpr bool
19 // operator!=(const allocator<T1>&, const allocator<T2>&) throw();
21 #include <memory>
22 #include <cassert>
24 #include "test_macros.h"
26 TEST_CONSTEXPR_CXX20 bool test()
28 std::allocator<int> a1;
29 std::allocator<int> a2;
30 assert(a1 == a2);
31 assert(!(a1 != a2));
33 return true;
36 int main(int, char**)
38 test();
40 #if TEST_STD_VER > 17
41 static_assert(test());
42 #endif
44 return 0;