File tree Expand file tree Collapse file tree 5 files changed +33
-8
lines changed
P2273R3_constexpr_unique_ptr
VSO_0157762_feature_test_macros Expand file tree Collapse file tree 5 files changed +33
-8
lines changed Original file line number Diff line number Diff line change 295
295
// P1132R7 out_ptr(), inout_ptr()
296
296
// P1147R1 Printing volatile Pointers
297
297
// P1272R4 byteswap()
298
+ // P1328R1 constexpr type_info::operator==()
298
299
// P1413R3 Deprecate aligned_storage And aligned_union
299
300
// P1425R4 Iterator Pair Constructors For stack And queue
300
301
// P1659R3 ranges::starts_with, ranges::ends_with
1456
1457
1457
1458
#define __cpp_lib_associative_heterogeneous_erasure 202110L
1458
1459
#define __cpp_lib_byteswap 202110L
1460
+ #define __cpp_lib_constexpr_typeinfo 202106L
1459
1461
1460
1462
#ifdef __cpp_lib_concepts
1461
1463
#define __cpp_lib_expected 202202L
Original file line number Diff line number Diff line change @@ -234,9 +234,6 @@ std/utilities/meta/meta.unary/meta.unary.prop/is_literal_type.deprecated.fail.cp
234
234
std/language.support/support.limits/support.limits.general/tuple.version.pass.cpp FAIL
235
235
std/language.support/support.limits/support.limits.general/utility.version.pass.cpp FAIL
236
236
237
- # P1328R1 constexpr type_info::operator==()
238
- std/language.support/support.limits/support.limits.general/typeinfo.version.pass.cpp FAIL
239
-
240
237
241
238
# *** MISSING COMPILER FEATURES ***
242
239
# Nothing here! :-)
Original file line number Diff line number Diff line change @@ -234,9 +234,6 @@ utilities\meta\meta.unary\meta.unary.prop\is_literal_type.deprecated.fail.cpp
234
234
language.support\support.limits\support.limits.general\tuple.version.pass.cpp
235
235
language.support\support.limits\support.limits.general\utility.version.pass.cpp
236
236
237
- # P1328R1 constexpr type_info::operator==()
238
- language.support\support.limits\support.limits.general\typeinfo.version.pass.cpp
239
-
240
237
241
238
# *** MISSING COMPILER FEATURES ***
242
239
# Nothing here! :-)
Original file line number Diff line number Diff line change 3
3
4
4
#include < cassert>
5
5
#include < memory>
6
+ #include < typeinfo>
6
7
#include < utility>
7
8
8
9
using namespace std ;
@@ -13,7 +14,7 @@ struct Dummy {
13
14
}
14
15
};
15
16
16
- constexpr bool test () {
17
+ constexpr bool test_P2273R3_constexpr_unique_ptr () {
17
18
// [memory.syn]
18
19
{
19
20
auto p1 = make_unique<int >(42 );
@@ -126,6 +127,20 @@ constexpr bool test() {
126
127
return true ;
127
128
}
128
129
129
- static_assert (test());
130
+ static_assert (test_P2273R3_constexpr_unique_ptr());
131
+
132
+ // Also test P1328R1 constexpr type_info::operator==()
133
+ constexpr bool test_P1328R1_constexpr_type_info_equality () {
134
+ assert (typeid (int ) == typeid (int ));
135
+ assert (typeid (int ) != typeid (double ));
136
+
137
+ assert (typeid (int ) == typeid (int &)); // N4910 [expr.typeid]/5
138
+ assert (typeid (int ) == typeid (const int &)); // N4910 [expr.typeid]/5
139
+ assert (typeid (int ) == typeid (const int )); // N4910 [expr.typeid]/6
140
+
141
+ return true ;
142
+ }
143
+
144
+ static_assert (test_P1328R1_constexpr_type_info_equality());
130
145
131
146
int main () {} // COMPILE-ONLY
Original file line number Diff line number Diff line change @@ -592,6 +592,20 @@ STATIC_ASSERT(__cpp_lib_constexpr_tuple == 201811L);
592
592
#endif
593
593
#endif
594
594
595
+ #if _HAS_CXX23
596
+ #ifndef __cpp_lib_constexpr_typeinfo
597
+ #error __cpp_lib_constexpr_typeinfo is not defined
598
+ #elif __cpp_lib_constexpr_typeinfo != 202106L
599
+ #error __cpp_lib_constexpr_typeinfo is not 202106L
600
+ #else
601
+ STATIC_ASSERT (__cpp_lib_constexpr_typeinfo == 202106L );
602
+ #endif
603
+ #else
604
+ #ifdef __cpp_lib_constexpr_typeinfo
605
+ #error __cpp_lib_constexpr_typeinfo is defined
606
+ #endif
607
+ #endif
608
+
595
609
#if _HAS_CXX20
596
610
#ifndef __cpp_lib_constexpr_utility
597
611
#error __cpp_lib_constexpr_utility is not defined
You can’t perform that action at this time.
0 commit comments