[PowerPC] Collect some CallLowering arguments into a struct. [NFC]
[llvm-project.git] / libcxx / test / std / numerics / complex.number / complex.ops / complex_equals_complex.pass.cpp
blob27621f165cf8ad00c9ecd0775fef60d23ab4f881
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 // <complex>
11 // template<class T>
12 // bool
13 // operator==(const complex<T>& lhs, const complex<T>& rhs);
15 #include <complex>
16 #include <cassert>
18 #include "test_macros.h"
20 template <class T>
21 void
22 test_constexpr()
24 #if TEST_STD_VER > 11
26 constexpr std::complex<T> lhs(1.5, 2.5);
27 constexpr std::complex<T> rhs(1.5, -2.5);
28 static_assert( !(lhs == rhs), "");
31 constexpr std::complex<T> lhs(1.5, 2.5);
32 constexpr std::complex<T> rhs(1.5, 2.5);
33 static_assert(lhs == rhs, "");
35 #endif
38 template <class T>
39 void
40 test()
43 std::complex<T> lhs(1.5, 2.5);
44 std::complex<T> rhs(1.5, -2.5);
45 assert( !(lhs == rhs));
48 std::complex<T> lhs(1.5, 2.5);
49 std::complex<T> rhs(1.5, 2.5);
50 assert(lhs == rhs);
52 test_constexpr<T> ();
55 int main(int, char**)
57 test<float>();
58 test<double>();
59 test<long double>();
60 // test_constexpr<int> ();
62 return 0;