multi_type: generic class for multi-typed members