From 1e6cc9dd6912acb73eb1cdaef69c4cd58ea3f2fb Mon Sep 17 00:00:00 2001 From: "Ralf W. Grosse-Kunstleve" Date: Wed, 16 Jun 2021 14:43:14 -0700 Subject: [PATCH] Adding back explicit but default copy constructor, to keep some older compilers happy. --- include/pybind11/detail/smart_holder_poc.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/pybind11/detail/smart_holder_poc.h b/include/pybind11/detail/smart_holder_poc.h index 4248ae262..320f7260c 100644 --- a/include/pybind11/detail/smart_holder_poc.h +++ b/include/pybind11/detail/smart_holder_poc.h @@ -61,6 +61,9 @@ struct guarded_operator_call { explicit guarded_operator_call(bool armed_flag) : armed_flag{armed_flag} {} virtual void operator()(void *) = 0; virtual ~guarded_operator_call() = default; + + // Some compilers complain if the implicitly defined copy constructor is used. + guarded_operator_call(const guarded_operator_call &) = default; }; template