Fixed build

This commit is contained in:
Charles Dang 2021-01-28 12:28:15 +11:00
parent 78373d7c59
commit e334e5f43d
2 changed files with 4 additions and 2 deletions

View File

@ -324,7 +324,7 @@ public:
instances--;
}
static const bool do_throw()
static bool do_throw()
{
return instances > 0;
}

View File

@ -56,7 +56,9 @@ public:
if(opt_) {
return opt_->get();
} else {
throw std::bad_optional_access{};
// We're going to drop this codepath once we can use optional::value anyway, but just
// noting we want this function to ultimately throw std::bad_optional_access.
throw std::runtime_error("Optional reference has no value");
}
#endif
}