Variant

asBool() [Variant class]

Returns a reference to the value contained in this variant as a bool. This can be used to modify the value of the variant.

// PROTOTYPE
bool& asBool();

This method will convert the type of the variant to bool if necessary, see toBool for more information. If the conversion is not possible, the method will cause a compilation error.

See value, as, and to for when to use the asXXX() vs. other accessors.