GCC compatibility fixes

This commit is contained in:
Jack Andersen 2016-04-15 10:41:57 -10:00
parent d2fb800b92
commit 617c121675
1 changed files with 6 additions and 2 deletions

View File

@ -554,11 +554,15 @@ public:
}
constexpr T const& value() const {
return initialized() ? contained_val() : atFatal("bad optional access");
if (!initialized())
atFatal("bad optional access");
return contained_val();
}
T& value() {
return initialized() ? contained_val() : atFatal("bad optional access");
if (!initialized())
atFatal("bad optional access");
return contained_val();
}
# endif