| 1 |
// { dg-do compile { target c++11 } } |
| 2 |
|
| 3 |
// Copyright (C) 2010-2025 Free Software Foundation, Inc. |
| 4 |
// |
| 5 |
// This file is part of the GNU ISO C++ Library. This library is free |
| 6 |
// software; you can redistribute it and/or modify it under the |
| 7 |
// terms of the GNU General Public License as published by the |
| 8 |
// Free Software Foundation; either version 3, or (at your option) |
| 9 |
// any later version. |
| 10 |
|
| 11 |
// This library is distributed in the hope that it will be useful, |
| 12 |
// but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 |
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 14 |
// GNU General Public License for more details. |
| 15 |
|
| 16 |
// You should have received a copy of the GNU General Public License along |
| 17 |
// with this library; see the file COPYING3. If not see |
| 18 |
// <http://www.gnu.org/licenses/>. |
| 19 |
|
| 20 |
#include <limits> |
| 21 |
#include <testsuite_common_types.h> |
| 22 |
|
| 23 |
namespace __gnu_test |
| 24 |
{ |
| 25 |
struct constexpr_member_data |
| 26 |
{ |
| 27 |
template<typename _Ttesttype> |
| 28 |
void |
| 29 |
operator()() |
| 30 |
{ |
| 31 |
struct _Concept |
| 32 |
{ |
| 33 |
void __constraint() |
| 34 |
{ |
| 35 |
using std::float_denorm_style; |
| 36 |
using std::float_round_style; |
| 37 |
constexpr bool v1 __attribute__((unused)) |
| 38 |
= _Ttesttype::is_specialized; |
| 39 |
constexpr int v2 __attribute__((unused)) |
| 40 |
= _Ttesttype::digits; |
| 41 |
constexpr int v3 __attribute__((unused)) |
| 42 |
= _Ttesttype::digits10; |
| 43 |
constexpr int v4 __attribute__((unused)) |
| 44 |
= _Ttesttype::max_digits10; |
| 45 |
constexpr bool v5 __attribute__((unused)) |
| 46 |
= _Ttesttype::is_signed; |
| 47 |
constexpr bool v6 __attribute__((unused)) |
| 48 |
= _Ttesttype::is_integer; |
| 49 |
constexpr bool v7 __attribute__((unused)) |
| 50 |
= _Ttesttype::is_exact; |
| 51 |
constexpr int v8 __attribute__((unused)) |
| 52 |
= _Ttesttype::radix; |
| 53 |
constexpr int v9 __attribute__((unused)) |
| 54 |
= _Ttesttype::min_exponent; |
| 55 |
constexpr int v10 __attribute__((unused)) |
| 56 |
= _Ttesttype::min_exponent10; |
| 57 |
constexpr int v11 __attribute__((unused)) |
| 58 |
= _Ttesttype::max_exponent; |
| 59 |
constexpr int v12 __attribute__((unused)) |
| 60 |
= _Ttesttype::max_exponent10; |
| 61 |
constexpr bool v13 __attribute__((unused)) |
| 62 |
= _Ttesttype::has_infinity; |
| 63 |
constexpr bool v14 __attribute__((unused)) |
| 64 |
= _Ttesttype::has_quiet_NaN; |
| 65 |
constexpr bool v15 __attribute__((unused)) |
| 66 |
= _Ttesttype::has_signaling_NaN; |
| 67 |
constexpr float_denorm_style v16 __attribute__((unused)) |
| 68 |
= _Ttesttype::has_denorm; |
| 69 |
constexpr bool v17 __attribute__((unused)) |
| 70 |
= _Ttesttype::has_denorm_loss; |
| 71 |
constexpr bool v18 __attribute__((unused)) |
| 72 |
= _Ttesttype::is_iec559; |
| 73 |
constexpr bool v19 __attribute__((unused)) |
| 74 |
= _Ttesttype::is_bounded; |
| 75 |
constexpr bool v20 __attribute__((unused)) |
| 76 |
= _Ttesttype::is_modulo; |
| 77 |
constexpr bool v21 __attribute__((unused)) |
| 78 |
= _Ttesttype::traps; |
| 79 |
constexpr bool v22 __attribute__((unused)) |
| 80 |
= _Ttesttype::tinyness_before; |
| 81 |
constexpr float_round_style v23 __attribute__((unused)) |
| 82 |
= _Ttesttype::round_style; |
| 83 |
} |
| 84 |
}; |
| 85 |
|
| 86 |
_Concept c; |
| 87 |
c.__constraint(); |
| 88 |
} |
| 89 |
}; |
| 90 |
} |
| 91 |
|
| 92 |
int main() |
| 93 |
{ |
| 94 |
__gnu_test::constexpr_member_data test; |
| 95 |
__gnu_cxx::typelist::apply_generator(test, __gnu_test::limits_tl()); |
| 96 |
return 0; |
| 97 |
} |