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

Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Work around GCC -Warray-bounds false positive in argument_vector
  • Loading branch information
rwgk committed Nov 29, 2025
commit d617f5efe5154f52904a6a5c66c75d30cad3f02c
6 changes: 6 additions & 0 deletions include/pybind11/cast.h
Original file line number Diff line number Diff line change
Expand Up @@ -2162,6 +2162,11 @@ class argument_loader {

template <size_t... Is>
bool load_impl_sequence(function_call &call, index_sequence<Is...>) {
PYBIND11_WARNING_PUSH
#if !defined(__clang__) && defined(__GNUC__) && __GNUC__ >= 13
// Work around a GCC -Warray-bounds false positive in argument_vector usage.
PYBIND11_WARNING_DISABLE_GCC("-Warray-bounds")
#endif
#ifdef __cpp_fold_expressions
if ((... || !std::get<Is>(argcasters).load(call.args[Is], call.args_convert[Is]))) {
return false;
Expand All @@ -2173,6 +2178,7 @@ class argument_loader {
}
}
#endif
PYBIND11_WARNING_POP
return true;
}

Expand Down
Loading