ResultVal: Fixed compilation when reassigning a ResultVal.

This commit is contained in:
Subv 2015-02-07 13:05:17 -05:00
parent 9a8d5794c7
commit 1b298ca1a3

View File

@ -307,14 +307,14 @@ public:
}
ResultVal& operator=(const ResultVal& o) {
if (*this) {
if (o) {
if (!empty()) {
if (!o.empty()) {
*GetPointer() = *o.GetPointer();
} else {
GetPointer()->~T();
}
} else {
if (o) {
if (!o.empty()) {
new (&storage) T(*o.GetPointer());
}
}