std::exception The exception thrown in the event of a failed get of a variant value. const char * T & variant<...> & T & const variant<...> & T * variant<...> * T * const variant<...> * Retrieves a value of a specified type from a given variant. If passed a pointer, it returns a similarly qualified pointer to the value content if successful, otherwise null is returned. If passed a reference, it returns a similarly qualified reference to the value content if successful. Overloads taking a variant pointer do not throw; the overloads taking a variant reference throws bad_get if unsuccessful. While visitation via apply_visitor is generally prefered due to its greater safety, explicit retrieval via get may be convenient in some circumstances.