1
1
// RUN: %cxx -verify -fsyntax-only %s -o -
2
2
3
+ // __is_void
4
+
3
5
static_assert (__is_void(int ) == false);
4
6
static_assert (__is_void(void ) == true);
5
7
static_assert (__is_void(void *) == false);
@@ -8,9 +10,22 @@ static_assert(__is_void(volatile void) == true);
8
10
static_assert (__is_void(const volatile void ) == true);
9
11
10
12
static_assert (__is_same(decltype(__is_void(void )), bool) == true);
11
-
12
13
static_assert (__is_same(decltype(__is_void(void )), int) == false);
13
14
15
+ // __is_floating_point
16
+
17
+ static_assert (__is_floating_point(float ) == true);
18
+ static_assert (__is_floating_point(double ) == true);
19
+ static_assert (__is_floating_point(long double ) == true);
20
+ static_assert (__is_floating_point(double long ) == true);
21
+ static_assert (__is_floating_point(const float ) == true);
22
+ static_assert (__is_floating_point(const double ) == true);
23
+ static_assert (__is_floating_point(const long double ) == true);
24
+ static_assert (__is_floating_point(float *) == false);
25
+ static_assert (__is_floating_point(float &) == false);
26
+
27
+ // __is_pointer
28
+
14
29
static_assert (__is_pointer(void *) == true);
15
30
16
31
int * p;
@@ -166,7 +181,7 @@ static_assert(__is_member_object_pointer(decltype(intField)) == true);
166
181
static_assert (__is_member_object_pointer(IntFieldT) == true);
167
182
static_assert (__is_member_object_pointer(int (Class::*)) == true);
168
183
169
- static_assert (__is_member_object_pointer(int (Class::*)()) == false);
184
+ static_assert (__is_member_object_pointer(int (Class::*)()) == false);
170
185
171
186
namespace ns {
172
187
struct list {
0 commit comments