Thanks to visit codestin.com
Credit goes to github.com

Skip to content

BUG: Fix invalid constructor in string_fastsearch.h with C++ >= 20. #26324

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

Merged
merged 1 commit into from
Apr 22, 2024

Conversation

Romain-Geissler-1A
Copy link
Contributor

This is an error with -std=gnu++20 at least with gcc 11 to 13, and will be an explicit warning with gcc >= 14. See
https://godbolt.org/z/YdoTc7r8f

In practice, it avoids these compilation errors:

In file included from ../numpy/_core/src/umath/string_ufuncs.cpp:20: ../numpy/_core/src/umath/string_fastsearch.h:63:31: error: expected unqualified-id before ')' token
   63 |     CheckedIndexer<char_type>()
      |                               ^
../numpy/_core/src/umath/string_fastsearch.h:69:40: error: expected ')' before '*' token
   69 |     CheckedIndexer<char_type>(char_type *buf, size_t len)
      |                              ~         ^~
      |

This is an error with -std=gnu++20 at least with gcc 11 to 13, and will
be an explicit warning with gcc >= 14. See
https://godbolt.org/z/YdoTc7r8f

In practice, it avoids these compilation errors:

In file included from ../numpy/_core/src/umath/string_ufuncs.cpp:20:
../numpy/_core/src/umath/string_fastsearch.h:63:31: error: expected unqualified-id before ')' token
   63 |     CheckedIndexer<char_type>()
      |                               ^
../numpy/_core/src/umath/string_fastsearch.h:69:40: error: expected ')' before '*' token
   69 |     CheckedIndexer<char_type>(char_type *buf, size_t len)
      |                              ~         ^~
      |
@Romain-Geissler-1A
Copy link
Contributor Author

Note: this problem impacts the upcoming release 2.0, so most likely you should backport it in the 2.0 branch as well ;)

@seberg
Copy link
Member

seberg commented Apr 22, 2024

LGTM, thanks @Romain-Geissler-1A.

@seberg seberg added the 09 - Backport-Candidate PRs tagged should be backported label Apr 22, 2024
@seberg seberg merged commit 077593a into numpy:main Apr 22, 2024
66 checks passed
@charris charris removed the 09 - Backport-Candidate PRs tagged should be backported label Apr 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants