delta-enabled-crdts icon indicating copy to clipboard operation
delta-enabled-crdts copied to clipboard

move shared context to shared_ptr

Open AlexDovgan opened this issue 2 years ago • 0 comments

Using C++ references for access to shared context did not implemented correctly. For correct work, the CRDT objects should not support copy semantic, just a move semantic should be supported. In current implementation on debug build in VS we get an exception, cause compiler not implement copy elision optimization, the copy constructor is calling when delta is creating and returning so code is crashing. For correct copy semantics supporting I implemented context as the std::shared_ptr.

AlexDovgan avatar Dec 13 '23 07:12 AlexDovgan