Skip to content

Commit 3156001

Browse files
committed
Make test work back up to Clang 3
1 parent 1ba0cbc commit 3156001

File tree

1 file changed

+15
-6
lines changed

1 file changed

+15
-6
lines changed

clang/test/CXX/drs/cwg7xx.cpp

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -77,13 +77,22 @@ namespace cwg712 { // cwg712: partial
7777
}
7878

7979
namespace cwg713 { // cwg713: yes
80-
static_assert(!__is_const(void()const), "");
81-
static_assert(!__is_const(void()const volatile), "");
82-
static_assert(!__is_volatile(void()volatile), "");
83-
static_assert(!__is_volatile(void()const volatile), "");
80+
template<typename T>
81+
struct is_const {
82+
static const bool value = __is_const(T);
83+
};
84+
template<typename T>
85+
struct is_volatile {
86+
static const bool value = __is_volatile(T);
87+
};
88+
89+
static_assert(!is_const<void()const>::value, "");
90+
static_assert(!is_const<void()const volatile>::value, "");
91+
static_assert(!is_volatile<void()volatile>::value, "");
92+
static_assert(!is_volatile<void()const volatile>::value, "");
8493
#if __cplusplus >= 201103L
85-
static_assert(!__is_const(void()const&), "");
86-
static_assert(!__is_volatile(void()volatile&), "");
94+
static_assert(!is_const<void()const&>::value, "");
95+
static_assert(!is_volatile<void()volatile&>::value, "");
8796
#endif
8897
} // namespace cwg713
8998

0 commit comments

Comments
 (0)