vendredi 30 septembre 2016

How many types can std::variant define?

I've learned there is a std::variant type in c++11. Looks like there are no predefined data types supported by the variant container but for each variant type the user may define her own data-type set.

std::variant<int, float> v;

I wonder, how long may the list of types be? Does the library has a predefined templates for a maximal number of parameter in Aleksandrescu manner, or is the variant supported by the compiler and the number of types is not limited?

Aucun commentaire:

Enregistrer un commentaire