Skip to content

Commit 12a4801

Browse files
BUG: Fix invalid constructor in string_fastsearch.h with C++ >= 20.
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) | ~ ^~ |
1 parent 552fdd4 commit 12a4801

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

numpy/_core/src/umath/string_fastsearch.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,13 +60,13 @@ struct CheckedIndexer {
6060
char_type *buffer;
6161
size_t length;
6262

63-
CheckedIndexer<char_type>()
63+
CheckedIndexer()
6464
{
6565
buffer = NULL;
6666
length = 0;
6767
}
6868

69-
CheckedIndexer<char_type>(char_type *buf, size_t len)
69+
CheckedIndexer(char_type *buf, size_t len)
7070
{
7171
buffer = buf;
7272
length = len;

0 commit comments

Comments
 (0)