Skip to content

Commit

Permalink
Add `PYBIND11_WARNING_DISABLE_CLANG("-Wgnu-zero-variadic-macro-argume…
Browse files Browse the repository at this point in the history
…nts")` in test_smart_ptr.cpp

This is the error message:

```
/__w/pybind11/pybind11/tests/test_smart_ptr.cpp:287:51: error: must specify at least one argument for '...' parameter of variadic macro [-Werror,-Wgnu-zero-variadic-macro-arguments]
PYBIND11_DECLARE_HOLDER_TYPE(T, std::shared_ptr<T>)
                                                  ^
/__w/pybind11/pybind11/include/pybind11/cast.h:885:13: note: macro 'PYBIND11_DECLARE_HOLDER_TYPE' defined here
            ^
```
  • Loading branch information
rwgk committed Nov 30, 2024
1 parent 5c5dc8b commit a575ad6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/test_smart_ptr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@
#include "object.h"
#include "pybind11_tests.h"

// This breaks on PYBIND11_DECLARE_HOLDER_TYPE
// These break on PYBIND11_DECLARE_HOLDER_TYPE
PYBIND11_WARNING_DISABLE_GCC("-Wpedantic")
PYBIND11_WARNING_DISABLE_CLANG("-Wgnu-zero-variadic-macro-arguments")

namespace {

Expand Down

0 comments on commit a575ad6

Please sign in to comment.