-
-
Notifications
You must be signed in to change notification settings - Fork 35
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
Introduce MS Windows CI #425
Merged
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
df5032f
Add Windows CI.
mgautierfr dcf0ca2
Correctly compile tests if build without writer (on Windows)
mgautierfr d6d67c2
Do not set gcc specific option.
mgautierfr 72fabb3
`ssize_t` is not defined on Windows.
mgautierfr 37aa9ef
Remove unused import of dirent.h
mgautierfr a124217
Correctly convert char to unsigned char before calling isprint.
mgautierfr d524aa8
Fix getTextLength on Windows
mgautierfr 7745ce7
Fix include of unistd.h on Windows
mgautierfr 86315e0
Port zimcheck to docoptcpp
mgautierfr 5a8c6df
Support older version of docopt.
mgautierfr File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
The only explanation that I could find is because of the following template constructor of
StringPiece
:If overload resolution for some reason chooses that constructor over
StringPiece(const std::string& str)
then the string is passed into it by value, and the pointer is bound to the data of a temporary object that is destroyed after the completion of theStringPiece
constructor. That explanation is valid for an explicitstringPiece
variable from your commented out example, since the temporary object definitely doesn't survive beyond that point. I am less sure if it can also be valid for the original single liner implementation, as I thought that the temporary objects are required to survive until the end of the full expression in the context of which they were created. But it can be a bug in the compiler (on top of the other bug that chooses the wrong overload).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.
Interesting idea but not conclusive.
I have removed this constructor in the stringpiece header and same error occurs.
I confirm to you that single liner version is not helping.
A single line "fix" is
return icu::UnicodeString::fromUTF8(utf8EncodedString.data()).length();
but we may truncate binary data containing\0
so I prefer be explicit about the data size.