[RISCV] Improve Errors for X1/X5/X1X5 Reg Classes (#126184)
[llvm-project.git] / libcxx / test / std / numerics / complex.number / complex.literals / literals2.pass.cpp
blob59a13786e8e525071c08f437ee60e80a001ca0ea
1 //===----------------------------------------------------------------------===//
2 //
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
6 //
7 //===----------------------------------------------------------------------===//
9 // UNSUPPORTED: c++03, c++11
10 // <complex>
12 #include <complex>
13 #include <type_traits>
14 #include <cassert>
16 #include "test_macros.h"
18 int main(int, char**)
20 using namespace std;
23 std::complex<long double> c1 = 3.0il;
24 assert ( c1 == std::complex<long double>(0, 3.0));
25 auto c2 = 3il;
26 assert ( c1 == c2 );
30 std::complex<double> c1 = 3.0i;
31 assert ( c1 == std::complex<double>(0, 3.0));
32 auto c2 = 3i;
33 assert ( c1 == c2 );
37 std::complex<float> c1 = 3.0if;
38 assert ( c1 == std::complex<float>(0, 3.0));
39 auto c2 = 3if;
40 assert ( c1 == c2 );
43 return 0;