class bad_variant_access : public exception { public: bad_variant_access() noexcept; virtual const char* what() const noexcept; };
Objects of type bad_variant_access are thrown to report invalid accesses to the value of a variant object.
Constructs a bad_variant_access object.
const char* what() const noexcept override;