1

If you have a class with explicit deletion of the copy constructor and assignment operation as in the following example

        Foo(const Foo& other) = delete;
        Foo& operator=(const Foo& other) = delete;

how can you specify it in the Pybind11 wrapper for the class? Ultimately the purpose is to follow the intended use for the C++ class which enforces moving and forbids copying

        Foo(const Foo& other) = delete;
        Foo& operator=(const Foo& other) = delete;
        Foo(Foo&& other) = default;
        Foo& operator=(Foo&& other) = default; 
A. Fenzry
  • 414
  • 3
  • 12

0 Answers0