PR c++/85765 - SFINAE and non-type default template arg.
[official-gcc.git] / gcc / testsuite / g++.dg / cpp0x / constexpr-builtin1.C
blobd663f8823452e10b25a234b7f2ff1d5f687ee8a1
1 // PR c++/49813
2 // { dg-do compile { target c++11 } }
4 inline constexpr bool
5 isinf(long double __x)
6 { return __builtin_isinf(__x); }
8 inline constexpr bool
9 isinf(double __x)
10 { return __builtin_isinf(__x); }
12 inline constexpr bool
13 isnan(long double __x)
14 { return __builtin_isnan(__x); }
16 int main()
18   constexpr long double num1 = __builtin_isinf(1.l); // Ok.
20   constexpr long double num2 = isinf(1.l);           // Error.
22   constexpr double      num3 = isinf(1.);            // Ok.
24   constexpr long double num4 = isnan(1.l);           // Ok.