Skip to content

Commit eb59506

Browse files
committed
[libcxx][test] Update msvc_stdlib_force_include.h for C++23
Make distinct `TEST_STD_VER` values for C++20 and C++23; add C++23 deprecation suppression. Fixes llvm#53597
1 parent 053c2a0 commit eb59506

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

libcxx/test/support/msvc_stdlib_force_include.h

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,18 +69,21 @@ const AssertionDialogAvoider assertion_dialog_avoider{};
6969
// Restore features that are removed in C++20.
7070
#define _HAS_FEATURES_REMOVED_IN_CXX20 1
7171

72-
// Silence warnings about features that are deprecated in C++17 and C++20.
72+
// Silence warnings about features that are deprecated in non-default language modes.
7373
#define _SILENCE_ALL_CXX17_DEPRECATION_WARNINGS
7474
#define _SILENCE_ALL_CXX20_DEPRECATION_WARNINGS
75+
#define _SILENCE_ALL_CXX23_DEPRECATION_WARNINGS
7576
#endif // _LIBCXX_IN_DEVCRT
7677

7778
#include <version>
7879

79-
#if _HAS_CXX20
80+
#if _HAS_CXX23
8081
#define TEST_STD_VER 99
82+
#elif _HAS_CXX20
83+
#define TEST_STD_VER 20
8184
#elif _HAS_CXX17
8285
#define TEST_STD_VER 17
83-
#else // !(_HAS_CXX20 || _HAS_CXX17)
86+
#else
8487
#define TEST_STD_VER 14
8588
#endif
8689

0 commit comments

Comments
 (0)