//===----------------------------------------------------------------------===// // // 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 // T // arg(T x); #include #include #include #include "../cases.h" template void test(T x, typename std::enable_if::value>::type* = 0) { static_assert((std::is_same::value), ""); assert(std::arg(x) == arg(std::complex(x, 0))); } template void test(T x, typename std::enable_if::value>::type* = 0) { static_assert((std::is_same::value), ""); assert(std::arg(x) == arg(std::complex(x, 0))); } template void test() { test(0); test(1); test(10); } int main() { test(); test(); test(); test(); test(); test(); }