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

Prohibit C++11 move from Document to Value #391

Merged
merged 1 commit into from
Jul 20, 2015

Conversation

pah
Copy link
Contributor

@pah pah commented Jul 20, 2015

As reported in #387, silently moving a GenericDocument to a GenericValue can lead to object slicing and premature deletion of the owning allocator of the (surviving) GenericValue.

To reduce this risk, prohibit move construction/assignment of a GenericValue from a GenericDocument.

As reported in Tencent#387, silently moving a `GenericDocument` to a
`GenericValue` can lead to object slicing and premature deletion of
the owning allocator of the (surviving) `GenericValue`.

To reduce this risk, prohibit move construction of a `GenericValue`
from a `GenericDocument`.
miloyip added a commit that referenced this pull request Jul 20, 2015
Prohibit C++11 move from Document to Value
@miloyip miloyip merged commit 3003b84 into Tencent:master Jul 20, 2015
@miloyip
Copy link
Collaborator

miloyip commented Jul 20, 2015

Thanks

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.

2 participants