Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@CaseyCarter
Copy link
Contributor

views::istream<T>::operator() currently emits "hard" errors when its argument is correctly derived_from a specialization of basic_istream but any of the other requirements isn't satisfied. This is non-conforming, since the CPO wording requires CPOs not to participate in overload resolution for sets of arguments that don't meet the CPOs requirements.

Let's flesh out the constraints, and add some negative test cases to ensure we get SFINAE instead of hard errors.

`views::istream<T>::operator()` currently emits "hard" errors when its argument is correctly `derived_from` a specialization of `basic_istream` but any of the other requirements isn't satisfied. This is non-conforming, since the CPO wording requires CPOs not to participate in overload resolution for sets of arguments that don't meet the CPOs requirements.

Let's flesh out the constraints, and add some negative test cases to ensure we get SFINAE instead of hard errors.
@CaseyCarter CaseyCarter added bug Something isn't working ranges C++20/23 ranges labels Jan 9, 2023
@CaseyCarter CaseyCarter requested a review from a team as a code owner January 9, 2023 10:04
@StephanTLavavej StephanTLavavej self-assigned this Jan 11, 2023
@StephanTLavavej
Copy link
Member

I'm mirroring this to the MSVC-internal repo - please notify me if any further changes are pushed.

@StephanTLavavej StephanTLavavej merged commit 7d58e57 into microsoft:main Jan 12, 2023
@CaseyCarter CaseyCarter deleted the istream-SFINAE branch January 12, 2023 02:29
@StephanTLavavej
Copy link
Member

Thanks for improving views::🍨! 😹 🎉 🤪

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working ranges C++20/23 ranges

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants