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