Skip to content

Commit 7529fbe

Browse files
committed
Try putting the suppression at class level
1 parent f6aaf68 commit 7529fbe

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

include/pybind11/cast.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2171,12 +2171,12 @@ class argument_loader {
21712171

21722172
/// Helper class which collects only positional arguments for a Python function call.
21732173
/// A fancier version below can collect any argument, but this one is optimal for simple calls.
2174+
// Disable warnings about useless comparisons when N == 0.
2175+
PYBIND11_WARNING_PUSH
2176+
PYBIND11_WARNING_DISABLE_GCC("-Wtype-limits")
2177+
PYBIND11_WARNING_DISABLE_INTEL(186)
21742178
template <size_t N, return_value_policy policy>
21752179
class simple_collector {
2176-
// Disable warnings about useless comparisons when N == 0.
2177-
PYBIND11_WARNING_PUSH
2178-
PYBIND11_WARNING_DISABLE_GCC("-Wtype-limits")
2179-
PYBIND11_WARNING_DISABLE_INTEL(186)
21802180
public:
21812181
template <typename... Ts>
21822182
explicit simple_collector(Ts &&...values) {

0 commit comments

Comments
 (0)