OSDN Git Service

[ADT] Make moving Optional not reset the Optional it moves from.
authorBenjamin Kramer <benny.kra@googlemail.com>
Thu, 25 Jan 2018 17:24:22 +0000 (17:24 +0000)
committerBenjamin Kramer <benny.kra@googlemail.com>
Thu, 25 Jan 2018 17:24:22 +0000 (17:24 +0000)
commit211131c1d53304aefd690510ac5f19fd9beb3a15
treeddf85e25a6b099a4765eaabe25b42c036a9c1f91
parent400b8143bf4c86f3f23d5774e0fc776f39b3158b
[ADT] Make moving Optional not reset the Optional it moves from.

This brings it in line with std::optional. My recent changes to
make Optional of trivial types trivially copyable introduced
diverging behavior depending on the type, which is bad. Now all
types have the same moving behavior.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@323445 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/ADT/Optional.h
unittests/ADT/OptionalTest.cpp