-
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
Workaround some Clang-16-rc2 regressions #3483
Conversation
* `<ranges>`: wrap `zip_transform_view`'s constraints in a named concept so we can redeclare the class template, e.g., in a `friend` declaration. Repetitions of atomic constraints with equal expressions do not subsume, and Clang 16 is enforcing this rule more strictly. * `<xutility>`: allow clang-format to format some more code, add some parens to keep it from going wild. Define a `_Store_size` helper concept for `subrange` instead of using a `static constexpr bool` class member as a perma-workaround for LLVM-60868. * `tests/std/tests/P0323R12_expected`: Don't reference a local variable in a local class definition. (Clang 16 refuses to compile this; I suspect current compilers should as well.) These changes don't make all tests pass with Clang 16, but should suffice to enable it to use the STL.
FYI: From the discussion in LLVM-60777 (which seems to share a root cause with LLVM-60868) the change that's triggering this issue is probably going to be reverted before the Clang 16 release. (There's a bug in the speculative implementation of CWG-2628.) I'm still inclined to apply the perma-workaround, since we want the constraints on the constructors to apply to implicitly-generated deduction guides, and I can't imagine that working well when our existing constraint depends on a static class member. |
Yeah, I think the perma-workaround is fine. |
I'm mirroring this to the MSVC-internal repo - please notify me if any further changes are pushed. |
Thanks for scouting out this Clang Future Technology! 🛸 🪄 😻 |
<ranges>
: wrapzip_transform_view
's constraints in a named concept so we can redeclare the class template, e.g., in afriend
declaration. Repetitions of atomic constraints with equal expressions do not subsume, and Clang 16 is enforcing this rule more strictly.<xutility>
: allow clang-format to format some more code, add some parens to keep it from going wild. Define a_Store_size
helper concept forsubrange
instead of using astatic constexpr bool
class member as a perma-workaround for LLVM-60868.tests/std/tests/P0323R12_expected
: Don't reference a local variable in a local class definition. (Clang 16 refuses to compile this; I suspect current compilers should as well.)These changes don't make all tests pass with Clang 16, but should suffice to enable it to use the STL.