| 
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  | 
@@ -279,13 +282,13 @@ struct holder_helper<ref<T>> {  | 
279 | 282 | } // namespace PYBIND11_NAMESPACE  | 
280 | 283 | 
 
  | 
281 | 284 | // Make pybind aware of the ref-counted wrapper type (s):  | 
282 |  | -PYBIND11_DECLARE_HOLDER_TYPE(T, ref<T>, true);  | 
 | 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_DECLARE_HOLDER_TYPE(T, std::shared_ptr<T>);  | 
285 |  | -PYBIND11_DECLARE_HOLDER_TYPE(T, huge_unique_ptr<T>);  | 
286 |  | -PYBIND11_DECLARE_HOLDER_TYPE(T, custom_unique_ptr<T>);  | 
287 |  | -PYBIND11_DECLARE_HOLDER_TYPE(T, shared_ptr_with_addressof_operator<T>);  | 
288 |  | -PYBIND11_DECLARE_HOLDER_TYPE(T, unique_ptr_with_addressof_operator<T>);  | 
 | 287 | +PYBIND11_DECLARE_HOLDER_TYPE(T, std::shared_ptr<T>)  | 
 | 288 | +PYBIND11_DECLARE_HOLDER_TYPE(T, huge_unique_ptr<T>)  | 
 | 289 | +PYBIND11_DECLARE_HOLDER_TYPE(T, custom_unique_ptr<T>)  | 
 | 290 | +PYBIND11_DECLARE_HOLDER_TYPE(T, shared_ptr_with_addressof_operator<T>)  | 
 | 291 | +PYBIND11_DECLARE_HOLDER_TYPE(T, unique_ptr_with_addressof_operator<T>)  | 
289 | 292 | 
 
  | 
290 | 293 | TEST_SUBMODULE(smart_ptr, m) {  | 
291 | 294 |     // Please do not interleave `struct` and `class` definitions with bindings code,  | 
 | 
0 commit comments