Skip to content

Commit

Permalink
Make test work back up to Clang 3
Browse files Browse the repository at this point in the history
  • Loading branch information
MitalAshok committed Jul 26, 2024
1 parent 1ba0cbc commit 3156001
Showing 1 changed file with 15 additions and 6 deletions.
21 changes: 15 additions & 6 deletions clang/test/CXX/drs/cwg7xx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,13 +77,22 @@ namespace cwg712 { // cwg712: partial
}

namespace cwg713 { // cwg713: yes
static_assert(!__is_const(void()const), "");
static_assert(!__is_const(void()const volatile), "");
static_assert(!__is_volatile(void()volatile), "");
static_assert(!__is_volatile(void()const volatile), "");
template<typename T>
struct is_const {
static const bool value = __is_const(T);
};
template<typename T>
struct is_volatile {
static const bool value = __is_volatile(T);
};

static_assert(!is_const<void()const>::value, "");
static_assert(!is_const<void()const volatile>::value, "");
static_assert(!is_volatile<void()volatile>::value, "");
static_assert(!is_volatile<void()const volatile>::value, "");
#if __cplusplus >= 201103L
static_assert(!__is_const(void()const&), "");
static_assert(!__is_volatile(void()volatile&), "");
static_assert(!is_const<void()const&>::value, "");
static_assert(!is_volatile<void()volatile&>::value, "");
#endif
} // namespace cwg713

Expand Down

0 comments on commit 3156001

Please sign in to comment.