Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

move shared context to shared_ptr #12

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

AlexDovgan
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant