//===----------------------------------------------------------------------===// // // 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. // //===----------------------------------------------------------------------===// // // template // complex // conj(const complex& x); #include #include template void test(const std::complex& z, std::complex x) { assert(conj(z) == x); } template void test() { test(std::complex(1, 2), std::complex(1, -2)); test(std::complex(-1, 2), std::complex(-1, -2)); test(std::complex(1, -2), std::complex(1, 2)); test(std::complex(-1, -2), std::complex(-1, 2)); } int main() { test(); test(); test(); }