aboutsummaryrefslogtreecommitdiff
path: root/test/std/numerics/complex.number/complex.special/float_double_implicit.fail.cpp
blob: d1519753285d27a8c63e6ad2dbbc5cdb37346bec (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
//===----------------------------------------------------------------------===//
//
//                     The LLVM Compiler Infrastructure
//
// This file is dual licensed under the MIT and the University of Illinois Open
// Source Licenses. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//

// <complex>

// template<> class complex<float>
// {
// public:
//     explicit constexpr complex(const complex<double>&);
// };

#include <complex>
#include <cassert>

int main()
{
    const std::complex<double> cd(2.5, 3.5);
    std::complex<float> cf = cd;
    assert(cf.real() == cd.real());
    assert(cf.imag() == cd.imag());
}