-
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 1
#4296
Conversation
…alizations that differ only in the requires-clause
…rray to const reference to pointer
…_copy_assignable_type> to be trivially copy-assignable
…e makes EDG ignore subsequent members
… within a function template
…ization in a mem-initializer
…r the private members can be accessed in the current context
…citDefault> has wrong value
…rs, but it should not
…dle an array of std::string in debug mode
…ked too early in constrained constructor
…tional noexcept with friendship
… pack expansion, when the pack is empty
…c constraint depends on itself
50c5def
to
c2f695c
Compare
This comment was marked as resolved.
This comment was marked as resolved.
… propagate triviality of assignment operations".
They were |
I'm mirroring this to the MSVC-internal repo - please notify me if any further changes are pushed. |
DevCom-10265237 "Parameter pack size mismatch doesn't make the require-expression false (regression)" is an MSVC bug. This preprocessor logic is guarding an additional constraint that MSVC needs, so I'm updating the `#endif` comment to "^^^ workaround ^^^". Previously, I believe this code was mentally saying, "we're in concepts code, so we only need to distinguish Clang from MSVC". This is no longer the case. Now we need `!defined(__clang__) && !defined(__EDG__)` to prevent EDG from using a workaround that it doesn't need.
DevCom-1691516 "std::vector::emplace_back does not work for a class with default initializer" is an MSVC bug. Curiously, this preprocessor logic was checking only `#ifdef __EDG__` to distinguish it from MSVC. (I think it might have been written before Clang supported construct_at()?) Instead, we need to check `#if defined(__clang__) || defined(__EDG__)` and send them to the "no workaround" case. This prevents Clang from using a workaround that it doesn't need.
I've pushed additional commits:
I have comment cleanups for a followup PR but I didn't want to further randomize this one when it's so close to landing. |
😻 🎉 🐈 🚀 🍰Thank you @cpplearner and @CaseyCarter for the massive amount of work needed to get to this long-awaited day! |
This PR makes
__cpp_lib_concepts
defined in C++20 mode for all supported compilers, after adding workarounds for various EDG concepts bugs. I have opened two follow-up PRs for non-essential and largely mechanical clean-ups.__cpp_lib_concepts
for EDG, part 2 #4297) replacesconcepts_20_matrix
andconcepts_latest_matrix
withusual_20_matrix
andusual_latest_matrix
respectively.__cpp_lib_concepts
for EDG, part 3 #4298) replacesdefined(__cpp_lib_concepts)
in preprocessing conditions with_HAS_CXX20
, and then eliminates some of them where they are redundant.