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 complex<T>& lhs, const T& rhs);
18 #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
), "");
55 std::complex<T
> lhs(1.5, 2.5);
60 std::complex<T
> lhs(1.5, 0);
65 std::complex<T
> lhs(1.5, 2.5);
70 std::complex<T
> lhs(1.5, 0);
72 assert( !(lhs
!= rhs
));
86 static_assert(test
<float>());
87 static_assert(test
<double>());
88 static_assert(test
<long double>());