double_float_explicit.pass.cpp revision f5256e16dfc425c1d466f6308d4026d529ce9e0b
1//===----------------------------------------------------------------------===// 2// 3// The LLVM Compiler Infrastructure 4// 5// This file is distributed under the University of Illinois Open Source 6// License. See LICENSE.TXT for details. 7// 8//===----------------------------------------------------------------------===// 9 10// <complex> 11 12// template<> class complex<double> 13// { 14// public: 15// constexpr complex(const complex<float>&); 16// }; 17 18#include <complex> 19#include <cassert> 20 21int main() 22{ 23 const std::complex<float> cd(2.5, 3.5); 24 std::complex<double> cf(cd); 25 assert(cf.real() == cd.real()); 26 assert(cf.imag() == cd.imag()); 27} 28