-
Notifications
You must be signed in to change notification settings - Fork 3.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
[C++] Compilation errors with re2 2023.06.02 on windows #38263
Comments
@felipecrv @bkietz @zeroshade this seems related to string view, so not sure who's best to take a look. |
This is related to the C++ |
It looks like previously re2::StringPiece::begin() returned a pointer, whereas now it may return an iterator struct instead. The fix is for code in arrow which uses StringPiece::begin() to replace that with StringPiece::data(), which will always return a pointer. |
I checked the |
… where a char pointer is expected (#38265) ### Rationale for this change The MSVC compiler doesn't seem to allow user code to assume `std::string_view::const_iterator` is `const char*`, so using only `re2::StringPiece` and preferring to call `.data()` instead of `.begin()` should make things more uniform across different compilers and STL implementations. ### What changes are included in this PR? - Using `re2::StringPiece` instead of `std::string_view` to interact with `re2` - Use `data()` instead of `begin()` where a `char*` is expected ### Are these changes tested? Yes, by existing tests. * Closes: #38263 Authored-by: Felipe Oliveira Carvalho <[email protected]> Signed-off-by: Raúl Cumplido <[email protected]>
… where a char pointer is expected (#38265) ### Rationale for this change The MSVC compiler doesn't seem to allow user code to assume `std::string_view::const_iterator` is `const char*`, so using only `re2::StringPiece` and preferring to call `.data()` instead of `.begin()` should make things more uniform across different compilers and STL implementations. ### What changes are included in this PR? - Using `re2::StringPiece` instead of `std::string_view` to interact with `re2` - Use `data()` instead of `begin()` where a `char*` is expected ### Are these changes tested? Yes, by existing tests. * Closes: #38263 Authored-by: Felipe Oliveira Carvalho <[email protected]> Signed-off-by: Raúl Cumplido <[email protected]>
…egin() where a char pointer is expected (apache#38265) ### Rationale for this change The MSVC compiler doesn't seem to allow user code to assume `std::string_view::const_iterator` is `const char*`, so using only `re2::StringPiece` and preferring to call `.data()` instead of `.begin()` should make things more uniform across different compilers and STL implementations. ### What changes are included in this PR? - Using `re2::StringPiece` instead of `std::string_view` to interact with `re2` - Use `data()` instead of `begin()` where a `char*` is expected ### Are these changes tested? Yes, by existing tests. * Closes: apache#38263 Authored-by: Felipe Oliveira Carvalho <[email protected]> Signed-off-by: Raúl Cumplido <[email protected]>
…egin() where a char pointer is expected (apache#38265) ### Rationale for this change The MSVC compiler doesn't seem to allow user code to assume `std::string_view::const_iterator` is `const char*`, so using only `re2::StringPiece` and preferring to call `.data()` instead of `.begin()` should make things more uniform across different compilers and STL implementations. ### What changes are included in this PR? - Using `re2::StringPiece` instead of `std::string_view` to interact with `re2` - Use `data()` instead of `begin()` where a `char*` is expected ### Are these changes tested? Yes, by existing tests. * Closes: apache#38263 Authored-by: Felipe Oliveira Carvalho <[email protected]> Signed-off-by: Raúl Cumplido <[email protected]>
…egin() where a char pointer is expected (apache#38265) ### Rationale for this change The MSVC compiler doesn't seem to allow user code to assume `std::string_view::const_iterator` is `const char*`, so using only `re2::StringPiece` and preferring to call `.data()` instead of `.begin()` should make things more uniform across different compilers and STL implementations. ### What changes are included in this PR? - Using `re2::StringPiece` instead of `std::string_view` to interact with `re2` - Use `data()` instead of `begin()` where a `char*` is expected ### Are these changes tested? Yes, by existing tests. * Closes: apache#38263 Authored-by: Felipe Oliveira Carvalho <[email protected]> Signed-off-by: Raúl Cumplido <[email protected]>
Describe the bug, including details regarding any error messages, version, and platform.
Due to some build changes, it took a while for conda-forge to ship re2 2023.06.02, but now that we're trying to compile arrow against that, we get some failures, though only on windows:
Normally there shouldn't be big API changes in re2 (though they did change the SOVERSION per that release). This happens both with/without the unity build.
Component(s)
C++, Packaging
The text was updated successfully, but these errors were encountered: