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 //===----------------------------------------------------------------------===//
13 // operator==(const T& lhs, const complex<T>& rhs);
18 #include "test_macros.h"
27 constexpr T
lhs(-2.5);
28 constexpr std::complex<T
> rhs(1.5, 2.5);
29 static_assert(!(lhs
== rhs
), "");
32 constexpr T
lhs(-2.5);
33 constexpr std::complex<T
> rhs(1.5, 0);
34 static_assert(!(lhs
== rhs
), "");
38 constexpr std::complex<T
> rhs(1.5, 2.5);
39 static_assert(!(lhs
== rhs
), "");
43 constexpr std::complex<T
> rhs(1.5, 0);
44 static_assert(lhs
== rhs
, "");
56 std::complex<T
> rhs(1.5, 2.5);
57 assert(!(lhs
== rhs
));
61 std::complex<T
> rhs(1.5, 0);
62 assert(!(lhs
== rhs
));
66 std::complex<T
> rhs(1.5, 2.5);
67 assert(!(lhs
== rhs
));
71 std::complex<T
> rhs(1.5, 0);
86 static_assert(test
<float>());
87 static_assert(test
<double>());
88 static_assert(test
<long double>());