Skip to content

Commit

Permalink
[libcxx][test] Update msvc_stdlib_force_include.h for C++23
Browse files Browse the repository at this point in the history
Make distinct `TEST_STD_VER` values for C++20 and C++23; add C++23 deprecation suppression.

Fixes #53597
  • Loading branch information
CaseyCarter committed Feb 20, 2022
1 parent 053c2a0 commit eb59506
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions libcxx/test/support/msvc_stdlib_force_include.h
Expand Up @@ -69,18 +69,21 @@ const AssertionDialogAvoider assertion_dialog_avoider{};
// Restore features that are removed in C++20.
#define _HAS_FEATURES_REMOVED_IN_CXX20 1

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

#include <version>

#if _HAS_CXX20
#if _HAS_CXX23
#define TEST_STD_VER 99
#elif _HAS_CXX20
#define TEST_STD_VER 20
#elif _HAS_CXX17
#define TEST_STD_VER 17
#else // !(_HAS_CXX20 || _HAS_CXX17)
#else
#define TEST_STD_VER 14
#endif

Expand Down

0 comments on commit eb59506

Please sign in to comment.