//===----------------------------------------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// // // template // complex // conj(const complex& x); #include #include #include "test_macros.h" 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(int, char**) { test(); test(); test(); return 0; }