1*4684ddb6SLionel Sambuc //===----------------------------------------------------------------------===// 2*4684ddb6SLionel Sambuc // 3*4684ddb6SLionel Sambuc // The LLVM Compiler Infrastructure 4*4684ddb6SLionel Sambuc // 5*4684ddb6SLionel Sambuc // This file is dual licensed under the MIT and the University of Illinois Open 6*4684ddb6SLionel Sambuc // Source Licenses. See LICENSE.TXT for details. 7*4684ddb6SLionel Sambuc // 8*4684ddb6SLionel Sambuc //===----------------------------------------------------------------------===// 9*4684ddb6SLionel Sambuc 10*4684ddb6SLionel Sambuc // <chrono> 11*4684ddb6SLionel Sambuc 12*4684ddb6SLionel Sambuc #include <complex> 13*4684ddb6SLionel Sambuc #include <type_traits> 14*4684ddb6SLionel Sambuc #include <cassert> 15*4684ddb6SLionel Sambuc main()16*4684ddb6SLionel Sambucint main() 17*4684ddb6SLionel Sambuc { 18*4684ddb6SLionel Sambuc #if _LIBCPP_STD_VER > 11 19*4684ddb6SLionel Sambuc using namespace std; 20*4684ddb6SLionel Sambuc 21*4684ddb6SLionel Sambuc { 22*4684ddb6SLionel Sambuc std::complex<long double> c1 = 3.0il; 23*4684ddb6SLionel Sambuc assert ( c1 == std::complex<long double>(0, 3.0)); 24*4684ddb6SLionel Sambuc auto c2 = 3il; 25*4684ddb6SLionel Sambuc assert ( c1 == c2 ); 26*4684ddb6SLionel Sambuc } 27*4684ddb6SLionel Sambuc 28*4684ddb6SLionel Sambuc { 29*4684ddb6SLionel Sambuc std::complex<double> c1 = 3.0i; 30*4684ddb6SLionel Sambuc assert ( c1 == std::complex<double>(0, 3.0)); 31*4684ddb6SLionel Sambuc auto c2 = 3i; 32*4684ddb6SLionel Sambuc assert ( c1 == c2 ); 33*4684ddb6SLionel Sambuc } 34*4684ddb6SLionel Sambuc 35*4684ddb6SLionel Sambuc { 36*4684ddb6SLionel Sambuc std::complex<float> c1 = 3.0if; 37*4684ddb6SLionel Sambuc assert ( c1 == std::complex<float>(0, 3.0)); 38*4684ddb6SLionel Sambuc auto c2 = 3if; 39*4684ddb6SLionel Sambuc assert ( c1 == c2 ); 40*4684ddb6SLionel Sambuc } 41*4684ddb6SLionel Sambuc 42*4684ddb6SLionel Sambuc #endif 43*4684ddb6SLionel Sambuc } 44