Return the 1‐based index of the held type, or 0 if unset.

Synopsis

Declared in <bdlb_variant.h>

int
typeIndex() const;

Description

Note that instead of switching code on the type index, calling apply is the preferred method of manipulating different types stored inside a variant.

Return Value

the 1‐based index of the held type, or 0 if unset

Created with MrDocs