//===----------------------------------------------------------------------===// // // ΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚThe LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// // // template complex proj(const complex&); // long double proj(long double); // double proj(double); // template double proj(T); // float proj(float); #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::proj(x) == proj(std::complex(x, 0))); } template void test(T x, typename std::enable_if::value>::type* = 0) { static_assert((std::is_same::value), ""); assert(std::proj(x) == proj(std::complex(x, 0))); } template void test(T x, typename std::enable_if::value && !std::is_floating_point::value>::type* = 0) { static_assert((std::is_same >::value), ""); assert(std::proj(x) == proj(std::complex(x, 0))); } template void test() { test(0); test(1); test(10); } int main() { test(); test(); test(); test(); test(); test(); }