Implement LWG3464 https://wg21.link/LWG3464
Details
- Reviewers
ldionne Mordante philnik - Group Reviewers
Restricted Project - Commits
- rG06ef752b7c23: [libc++] Implement LWG3464(istream::gcount() can overflow)
rGd57fe1dbe050: [libc++] Implement LWG3464(istream::gcount() can overflow)
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
I'm so sorry that I have no idea how to test stream size overflow in this change now.
libcxx/include/istream | ||
---|---|---|
224 | Please use my suggestion, that matches our latest coding standard. Nit: I prefer to have private, protected, public in that order, especially since there is already a private section. |
Shouldn't this be possible to actually test? If not, please add a comment why this change was done.
Sorry, It may be because I didn't refresh the browser page, so I didn't see the status change to Request change. I apologize for that. I'll revert this change to resolve your concerns. I have no idea that how to test this, can you please give some guide? many thanks!
Do you have a suggestion how to test this. It depends on overflowing streamsize. This is an alias of ptrdiff_t.
For the future it's possible to address these comments after landing the patch. It was not really needed to revert it. But now let's land if after @philnik is happy.
Ah sorry, I missed that. I though it depends the char traits. In that case I'm happy with a short explanation in the commit message. Sorry for the churn.
LGTM with a comment in the commit message.
This is a new function, so no need to change the behaviour after V1.