$ errors.fyi/cpp/std--bad_optional_access 74 namespaces · 3,092 codes
cpp · cpp/std--bad_optional_access
std--bad_optional_access

std::bad_optional_access

Thrown by std::optional::value() when the optional object does not contain a value. Use optional::has_value() or the dereference operator (*opt) to avoid the throw.

References

In this namespace

» community-maintained · contribute on GitHub npm i -g errors-fyi && errorfyi ENOENT