File tree Expand file tree Collapse file tree 2 files changed +3
-8
lines changed Expand file tree Collapse file tree 2 files changed +3
-8
lines changed Original file line number Diff line number Diff line change @@ -868,9 +868,6 @@ struct always_construct_holder {
868
868
static constexpr bool value = Value;
869
869
};
870
870
871
- PYBIND11_WARNING_PUSH
872
- PYBIND11_WARNING_DISABLE_GCC (" -Wpedantic" )
873
- PYBIND11_WARNING_DISABLE_CLANG(" -Wgnu-zero-variadic-macro-arguments" )
874
871
// / Create a specialization for custom holder types (silently ignores std::shared_ptr)
875
872
#define PYBIND11_DECLARE_HOLDER_TYPE (type, holder_type, ...) \
876
873
PYBIND11_NAMESPACE_BEGIN (PYBIND11_NAMESPACE) \
@@ -883,7 +880,6 @@ PYBIND11_WARNING_DISABLE_CLANG("-Wgnu-zero-variadic-macro-arguments")
883
880
: public type_caster_holder<type, holder_type> {}; \
884
881
} \
885
882
PYBIND11_NAMESPACE_END (PYBIND11_NAMESPACE)
886
- PYBIND11_WARNING_POP
887
883
888
884
// PYBIND11_DECLARE_HOLDER_TYPE holder types:
889
885
template <typename base, typename holder>
Original file line number Diff line number Diff line change 11
11
#include " object.h"
12
12
#include " pybind11_tests.h"
13
13
14
+ // This breaks on PYBIND11_DECLARE_HOLDER_TYPE
15
+ PYBIND11_WARNING_DISABLE_GCC (" -Wpedantic" )
16
+
14
17
namespace {
15
18
16
19
// This is just a wrapper around unique_ptr, but with extra fields to deliberately bloat up the
@@ -281,15 +284,11 @@ struct holder_helper<ref<T>> {
281
284
// Make pybind aware of the ref-counted wrapper type (s):
282
285
PYBIND11_DECLARE_HOLDER_TYPE (T, ref<T>, true )
283
286
// The following is not required anymore for std::shared_ptr, but it should compile without error:
284
- PYBIND11_WARNING_PUSH
285
- PYBIND11_WARNING_DISABLE_GCC(" -Wpedantic" )
286
- PYBIND11_WARNING_DISABLE_CLANG(" -Wgnu-zero-variadic-macro-arguments" )
287
287
PYBIND11_DECLARE_HOLDER_TYPE(T, std::shared_ptr<T>)
288
288
PYBIND11_DECLARE_HOLDER_TYPE(T, huge_unique_ptr<T>)
289
289
PYBIND11_DECLARE_HOLDER_TYPE(T, custom_unique_ptr<T>)
290
290
PYBIND11_DECLARE_HOLDER_TYPE(T, shared_ptr_with_addressof_operator<T>)
291
291
PYBIND11_DECLARE_HOLDER_TYPE(T, unique_ptr_with_addressof_operator<T>)
292
- PYBIND11_WARNING_POP
293
292
294
293
TEST_SUBMODULE(smart_ptr, m) {
295
294
// Please do not interleave `struct` and `class` definitions with bindings code,
You can’t perform that action at this time.
0 commit comments