| 1 |
// PR c++/49813 |
| 2 |
// { dg-do compile { target c++11 } } |
| 3 |
|
| 4 |
inline constexpr bool |
| 5 |
isinf(long double __x) |
| 6 |
{ return __builtin_isinf(__x); } |
| 7 |
|
| 8 |
inline constexpr bool |
| 9 |
isinf(double __x) |
| 10 |
{ return __builtin_isinf(__x); } |
| 11 |
|
| 12 |
inline constexpr bool |
| 13 |
isnan(long double __x) |
| 14 |
{ return __builtin_isnan(__x); } |
| 15 |
|
| 16 |
int main() |
| 17 |
{ |
| 18 |
constexpr long double num1 = __builtin_isinf(1.l); // Ok. |
| 19 |
|
| 20 |
constexpr long double num2 = isinf(1.l); // Error. |
| 21 |
|
| 22 |
constexpr double num3 = isinf(1.); // Ok. |
| 23 |
|
| 24 |
constexpr long double num4 = isnan(1.l); // Ok. |
| 25 |
} |