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 complex<T>& lhs, const T& rhs);
19 #include "test_macros.h"
27 constexpr std::complex<T> lhs(1.5, 2.5);
28 constexpr T rhs(-2.5);
29 static_assert(!(lhs == rhs), "");
32 constexpr std::complex<T> lhs(1.5, 0);
33 constexpr T rhs(-2.5);
34 static_assert(!(lhs == rhs), "");
37 constexpr std::complex<T> lhs(1.5, 2.5);
39 static_assert(!(lhs == rhs), "");
42 constexpr std::complex<T> lhs(1.5, 0);
44 static_assert( (lhs == rhs), "");
54 std::complex<T> lhs(1.5, 2.5);
56 assert(!(lhs == rhs));
59 std::complex<T> lhs(1.5, 0);
61 assert(!(lhs == rhs));
64 std::complex<T> lhs(1.5, 2.5);
66 assert(!(lhs == rhs));
69 std::complex<T> lhs(1.5, 0);
71 assert( (lhs == rhs));
82 // test_constexpr<int> ();