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

std::bad_variant_access

Thrown by std::get<T>(variant) or std::get<I>(variant) when the variant does not hold the requested alternative. Use std::holds_alternative<T> to check before accessing.

References

In this namespace

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