0

I have a C++ class:

namespace kinsdb {
   class Client : 
     public:
      virtual std::unique_ptr<Transaction> StartTransaction(const TransactionOptions& opts) = 0;
      virtual std::unique_ptr<Transaction> StartTransaction() { return StartTransaction(kDefaultTransactionOptions); }
}

I want to change C++ code to Java code with SWIG. What can I do to deal with std::unique_ptr pointer??

error: use of deleted function 'std::unique_ptr<

when
  • 1
  • 1
  • That's not actual code because C++ syntax doesn't work that way, but if you were to correct the syntax there's otherwise nothing wrong with this code. The fact that you've truncated the error message to the point that we can't see what function it's talking about also doesn't help. Show the real code, or a minimal reproduceable example. – Daniel McLaury Oct 17 '22 at 06:22
  • Other than the demo I don't think there's anything python specific here https://stackoverflow.com/questions/27693812/how-to-handle-unique-ptrs-with-swig#27699663 – Flexo Oct 30 '22 at 08:25

0 Answers0