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
[range.adaptors] Replace Base with const V for clarity #2605
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works for me.
LWG 3181 says we must use "Base" here, not "const V", to correctly handle the template instantiation of the enclosing class. @CaseyCarter, have you changed your opinion since you approved these changes? |
Yes, and I've since changed it back again after running a canonical example past the core reflector. I currently believe these changes are valid and the concept implementations are buggy. Sorry for the confusion - it can be challenging to determine which issues are actual problems with the spec and which are bugs in the implementations. |
That's right. Using requires clauses doesn't require you to do the same workaround of introducing a dummy template parameter defaulted to some outer one for the sake of delayed instantiation to apply SFINAE. |
@@ -2307,7 +2307,7 @@ | |||
iterator() = default; | |||
constexpr iterator(Parent& parent, iterator_t<Base> current); | |||
constexpr iterator(iterator<!Const> i) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It'd be clearer to use iterator<false>
here. Oh, we can't do that because that'd be ill-formed when instantiating with Const = false
. Yuck, what a language!
I believe this is technically not editorial: the precise spelling of the |
https://wg21.link/P1983 will take care of this. |
See discussion at #2596 (comment).