Skip to content

Commit 1e6cc9d

Browse files
committed
Adding back explicit but default copy constructor, to keep some older compilers happy.
1 parent 275aaf9 commit 1e6cc9d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

include/pybind11/detail/smart_holder_poc.h

+3
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,9 @@ struct guarded_operator_call {
6161
explicit guarded_operator_call(bool armed_flag) : armed_flag{armed_flag} {}
6262
virtual void operator()(void *) = 0;
6363
virtual ~guarded_operator_call() = default;
64+
65+
// Some compilers complain if the implicitly defined copy constructor is used.
66+
guarded_operator_call(const guarded_operator_call &) = default;
6467
};
6568

6669
template <typename T>

0 commit comments

Comments
 (0)