diff --git a/include/pybind11/cast.h b/include/pybind11/cast.h index bb6ac6719a..baccbcca46 100644 --- a/include/pybind11/cast.h +++ b/include/pybind11/cast.h @@ -870,9 +870,9 @@ struct always_construct_holder { // Avoid -Wgnu-zero-variadic-macro-arguments in C++20 on clang #ifdef PYBIND11_CPP20 - #define PYBIND11_DECLARE_HOLDER_TYPE_ARGS(...) void __VA_OPT__(,) __VA_ARGS__ +# define PYBIND11_DECLARE_HOLDER_TYPE_ARGS(...) void __VA_OPT__(, ) __VA_ARGS__ #else - #define PYBIND11_DECLARE_HOLDER_TYPE_ARGS(...) void, ##__VA_ARGS__ +# define PYBIND11_DECLARE_HOLDER_TYPE_ARGS(...) void, ##__VA_ARGS__ #endif /// Create a specialization for custom holder types (silently ignores std::shared_ptr) @@ -880,8 +880,8 @@ struct always_construct_holder { PYBIND11_NAMESPACE_BEGIN(PYBIND11_NAMESPACE) \ namespace detail { \ template \ - struct always_construct_holder : always_construct_holder { \ - }; \ + struct always_construct_holder \ + : always_construct_holder {}; \ template \ class type_caster::value>> \ : public type_caster_holder {}; \