Implementation of std::variant_size.
This implementation also accepts other typelist-parameterized classes, such as std::variant.