DescriptionFix base::Optional constexpr ctor on gcc 4.8.
g++ 4.8 failed to compile base::Optional<std::unique_ptr<int>>().
A simpler example is:
class C {
public:
constexpr C() {}
~C() {}
private:
union {
char empty_ = '\0';
std::unique_ptr<int> value_;
};
};
g++ 4.8 fails to compile this. But adding empty_('\0') to member
initializer list makes it happy.
This patch does the same for both OptionalStorage default constructors.
BUG=
Committed: https://crrev.com/a637f25fb515f8e860bc941cc1cb24b7862f3c5b
Cr-Commit-Position: refs/heads/master@{#427850}
Patch Set 1 #
Total comments: 4
Patch Set 2 : Address review comments #Messages
Total messages: 12 (4 generated)
|