1 //===----------------------------------------------------------------------===//
3 // The LLVM Compiler Infrastructure
5 // This file is dual licensed under the MIT and the University of Illinois Open
6 // Source Licenses. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
14 // operator==(const T& lhs, const complex<T>& rhs);
19 #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, "");
55 std::complex<T> rhs(1.5, 2.5);
56 assert(!(lhs == rhs));
60 std::complex<T> rhs(1.5, 0);
61 assert(!(lhs == rhs));
65 std::complex<T> rhs(1.5, 2.5);
66 assert(!(lhs == rhs));
70 std::complex<T> rhs(1.5, 0);
82 // test_constexpr<int>();