fix Expected<..., eUnion> move / copy ctor
authorPhilip Pronin <philipp@fb.com>
Tue, 25 Oct 2016 06:27:16 +0000 (23:27 -0700)
committerFacebook Github Bot <facebook-github-bot-bot@fb.com>
Tue, 25 Oct 2016 06:38:29 +0000 (23:38 -0700)
commitc1ead85dff393f6e5c356073375bc955e1714403
tree3863aba152a1ca63c0d762260ef2a3f28368c042
parent02548aa013320689d38b906fa893a028f4cdfb6b
fix Expected<..., eUnion> move / copy ctor

Summary:
Consider `Expected<..., eUnion>(Expected&&)` ctor, where
`ExpectedUnion` move ctor would be called first, which is noop leaving
`which_`  uninitialized; then `MoveConstructible` ctor is executed, calling
`assignValue()`, which performs action depending on uninitialized `which_`.

Reviewed By: yfeldblum

Differential Revision: D4073199

fbshipit-source-id: 623660e7047afcebf9f72d83f91f84ff6078090f
folly/Expected.h