-
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
Implement P2432R1 Fix istream_view
#2245
Conversation
Drive-by: Drop extraneous `if constexpr` condition in `join_view::end` as suggested by cplusplus/draft#4957. Fixes microsoft#2240
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.
Looks good to me
{ // using ranges::basic_istream_view with wide stream | ||
wistringstream wintstream{L"0 1 2 3"}; | ||
T input_value[] = {-1, -1, -1, -1, -1}; | ||
ranges::copy(basic_istream_view<T, wchar_t>{wintstream}, input_value); | ||
assert(ranges::equal(input_value, expected)); | ||
} | ||
|
||
{ // using ranges::basic_istream_view with narrow stream | ||
istringstream intstream{"0 1 2 3"}; | ||
T input_value[] = {-1, -1, -1, -1, -1}; | ||
ranges::copy(basic_istream_view<T, char>{intstream}, input_value); | ||
assert(ranges::equal(input_value, expected)); | ||
} |
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.
Ultra nitpicks, no change requested: (1) I observe that these are wide-then-narrow while the following tests are ordered narrow-then-wide, and (2) I observe that these tests don't verify static_assert(noexcept)
while the following tests do. (For the latter, there is no loss of coverage since istream_view
and wistream_view
are alias templates for basic_istream_view
.)
This isn't significant enough to reset testing, just wanted to comment on something. 😹
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.
Ultra nitpicks, no change requested: (1) I observe that these are wide-then-narrow while the following tests are ordered narrow-then-wide, and (2) I observe that these tests don't verify
static_assert(noexcept)
while the following tests do. (For the latter, there is no loss of coverage sinceistream_view
andwistream_view
are alias templates forbasic_istream_view
.)This isn't significant enough to reset testing, just wanted to comment on something. 😹
I agree this just doesn't quite rise to the level of resetting testing. I'll keep the comment open just in case someone requests another change in which case I'll address this as well.
I'm mirroring this to an MSVC-internal PR; please notify me if any further changes are pushed. |
Thanks for traveling back in time to save the future! 🤖 ⏳ ✔️ |
Drive-by: Drop extraneous
if constexpr
condition injoin_view::end
as suggested by cplusplus/draft#4957.Fixes #2240