From 9f108908664de6672bc24471b0e89343e5b1df99 Mon Sep 17 00:00:00 2001 From: Sergey Lyskov Date: Mon, 9 Sep 2024 15:09:28 -0600 Subject: [PATCH] add check for copy-contractor skipping request --- source/class.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/class.cpp b/source/class.cpp index 13156359..f4058e12 100644 --- a/source/class.cpp +++ b/source/class.cpp @@ -1282,7 +1282,7 @@ void ClassBinder::bind(Context &context) if( t->getAccess() == AS_public and !t->isMoveConstructor() and is_bindable(*t) and !is_skipping_requested(*t, Config::get()) /*and t->doesThisDeclarationHaveABody()*/ ) { ConstructorBindingInfo CBI = {C, *t, trampoline, qualified_name, trampoline_name, context}; - if( t->isCopyConstructor() /*and not copy_constructor_processed*/ ) { + if( t->isCopyConstructor() /*and not copy_constructor_processed*/ and !is_skipping_requested(*t, Config::get() ) { // constructors += "\tcl.def(pybind11::init<{} const &>());\n"_format(binding_qualified_name); //(*t) -> dump(); constructors += bind_copy_constructor(CBI);