File tree Expand file tree Collapse file tree 1 file changed +15
-6
lines changed Expand file tree Collapse file tree 1 file changed +15
-6
lines changed Original file line number Diff line number Diff line change @@ -77,13 +77,22 @@ namespace cwg712 { // cwg712: partial
77
77
}
78
78
79
79
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, " " );
84
93
#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 , "");
87
96
#endif
88
97
} // namespace cwg713
89
98
You can’t perform that action at this time.
0 commit comments