-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable __cpp_lib_concepts
for EDG, part 3
#4298
Conversation
The following substitutions are performed: - `#elif _HAS_CXX20 && defined(__cpp_lib_concepts) // TRANSITION, microsoftGH-395` => `#elif _HAS_CXX20` - `#elif defined(__cpp_lib_concepts)` => `#elif _HAS_CXX20` - `#else // ^^^ !defined(__cpp_lib_concepts) / defined(__cpp_lib_concepts) vvv` => `#else // ^^^ !_HAS_CXX20 / _HAS_CXX20 vvv` - `#else // ^^^ _HAS_CXX20 && !defined(__cpp_lib_concepts) / !_HAS_CXX20 vvv` => `#else // ^^^ _HAS_CXX20 / !_HAS_CXX20 vvv` - `#else // ^^^ defined(__cpp_lib_concepts) / !defined(__cpp_lib_concepts) vvv` => `#else // ^^^ _HAS_CXX20 / !_HAS_CXX20 vvv` - `#endif // !_HAS_CXX20 || !defined(__cpp_lib_concepts)` => `#endif // !_HAS_CXX20` - `#endif // ^^^ !defined(__cpp_lib_concepts) ^^^` => `#endif // ^^^ !_HAS_CXX20 ^^^` - `#endif // ^^^ defined(__cpp_lib_concepts) ^^^` => `#endif // ^^^ _HAS_CXX20 ^^^` - `#endif // _HAS_CXX20 && defined(__cpp_lib_concepts)` => `#endif // _HAS_CXX20` - `#endif // _HAS_CXX23 && defined(__cpp_lib_concepts)` => `#endif // _HAS_CXX23` - `#endif // _HAS_CXX23 && defined(__cpp_lib_concepts) // TRANSITION, microsoftGH-395` => `#endif // _HAS_CXX23` - `#endif // __cpp_lib_concepts` => `#endif // _HAS_CXX20` - `#endif // defined(__cpp_lib_concepts)` => `#endif // _HAS_CXX20` - `#endif // defined(__cpp_lib_concepts) && _HAS_CXX23` => `#endif // _HAS_CXX23` - `#if !_HAS_CXX20 || !defined(__cpp_lib_concepts) // TRANSITION, microsoftGH-395` => `#if !_HAS_CXX20` - `#if !_HAS_CXX23 || !defined(__cpp_lib_concepts) // TRANSITION, microsoftGH-395` => `#if !_HAS_CXX23` - `#if _HAS_CXX20 && defined(__cpp_lib_concepts) // TRANSITION, microsoftGH-395` => `#if _HAS_CXX20` - `#if _HAS_CXX23 && defined(__cpp_lib_concepts) // TRANSITION, microsoftGH-395` => `#if _HAS_CXX23` - `#if _HAS_CXX23 && defined(__cpp_lib_concepts)` => `#if _HAS_CXX23` - `#if defined(__cpp_lib_concepts) && _HAS_CXX23` => `#if _HAS_CXX23` - `#if defined(__cpp_lib_concepts) // TRANSITION, microsoftGH-395` => `#if _HAS_CXX20` - `#if defined(__cpp_lib_concepts)` => `#if _HAS_CXX20` - `#ifdef __cpp_lib_concepts // TRANSITION, microsoftGH-395` => `#if _HAS_CXX20` - `#ifdef __cpp_lib_concepts` => `#if _HAS_CXX20` - `#ifndef __cpp_lib_concepts` => `#if !_HAS_CXX20`
e738e6f
to
6f0a1fc
Compare
3f6510c
to
76890e5
Compare
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
Also sort headers and improve arrow comments.
tests/std/tests/VSO_0157762_feature_test_macros/test.compile.pass.cpp
Outdated
Show resolved
Hide resolved
Thanks for this amazing simplification - so much workaround code being deleted! 😻 I found only one occurrence of damage (impressive for such a large PR), and identified a few opportunities for cleanups while looking at the surrounding context of the changes:
|
I'm mirroring this to the MSVC-internal repo - please notify me if any further changes are pushed. |
Thanks yet again for this massive, long-awaited improvement! 😻 🎉 🎉 |
This PR mechanically changes preprocessing conditions involving
__cpp_lib_concepts
to say_HAS_CXX20
, and then removes some redundant conditions.Most of the replacement is done in the first commit (5e05034), which is completely mechanical (see commit message).
Commit 7687eec removes occurrences of
#if _HAS_CXX20
within#if _HAS_CXX20
blocks.Commit ba1dd83 removes occurrences of
#if _HAS_CXX20
within#if _HAS_CXX23
blocks.Commit 730bca0 removes occurrences of
#if _HAS_CXX20
within tests that use*_20_matrix
.Commit e303104 removes occurrences of
#if _HAS_CXX20
within tests that use*_latest_matrix
.The other commits are tiny cleanups.
Fixes #395.
Blocked on #4296.