Skip to content

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