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"
26 constexpr T
lhs(-2.5);
27 constexpr std::complex<T
> rhs(1.5, 2.5);
28 static_assert(!(lhs
== rhs
), "");
31 constexpr T
lhs(-2.5);
32 constexpr std::complex<T
> rhs(1.5, 0);
33 static_assert(!(lhs
== rhs
), "");
37 constexpr std::complex<T
> rhs(1.5, 2.5);
38 static_assert(!(lhs
== rhs
), "");
42 constexpr std::complex<T
> rhs(1.5, 0);
43 static_assert(lhs
== rhs
, "");
54 std::complex<T
> rhs(1.5, 2.5);
55 assert(!(lhs
== rhs
));
59 std::complex<T
> rhs(1.5, 0);
60 assert(!(lhs
== rhs
));
64 std::complex<T
> rhs(1.5, 2.5);
65 assert(!(lhs
== rhs
));
69 std::complex<T
> rhs(1.5, 0);
81 // test_constexpr<int>();