-
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
Use permissive wide-to-narrow transcoding in filesystem_error #1010
Use permissive wide-to-narrow transcoding in filesystem_error #1010
Conversation
0307330
to
d9baf83
Compare
d9baf83
to
b83cd85
Compare
This looks reasonable but needs tests. |
I don't know why the CI is unhappy.
For example:
|
Thanks, I'll add a test. Is it ok to assume that the tests won't run with a utf-8 system codepage? Not that I have any idea what else to do about that :). |
If I understand correctly getting that requires a manifest we aren't going to be adding to our bits. If you're concerned you can replace my 'emoji that goes boom' with an incorrect surrogate pair or something like that. |
Added a test. I am not sure whether I also added a check to make sure the test is actually testing something. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
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.
This looks good to me - I have some superficial nitpicks, but all of the logic appears to be correct and following our various conventions (thanks for imitating the existing machinery closely).
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.
Yay! Thanks for clang-formatting - looks like my brain can't perfectly simulate it yet.
Thanks for your quick feedback 👍 |
Congratulations on your first STL contribution! |
Fixes #927:
std::filesystem_error
constructor used to raise astd::system_error
when given paths that are not representable in the current codepage. This replaces unrepresentable characters with a replacement character instead of raisingsystem_error
.