Skip to content

Commit 8819ec4

Browse files
committed
Remove copy constructor
1 parent 97b50fe commit 8819ec4

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tests/test_multiple_interpreters/mod_per_interpreter_gil_with_singleton.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ class MySingleton {
1515
public:
1616
MySingleton() = default;
1717
~MySingleton() = default;
18+
MySingleton(const MySingleton &) = delete;
19+
MySingleton &operator=(const MySingleton &) = delete;
20+
MySingleton(MySingleton &&) = default;
21+
MySingleton &operator=(MySingleton &&) = default;
1822

1923
static MySingleton &get_instance() {
2024
PYBIND11_CONSTINIT static py::gil_safe_call_once_and_store<MySingleton> storage;

0 commit comments

Comments
 (0)