4 ms·
You can put together an `std.builtin.TypeInfo` structure describing the type (eg. by using `@typeInfo` on an existing type and editing the result, adding someth
by nikki93 6y ago
You can put together an `std.builtin.TypeInfo` structure describing the type (eg. by using `@typeInfo` on an existing type and editing the result, adding something under `.Struct.fields`); then use `@Type` to 'unreflect' it back into a real type.
- fpoling 6y agoSplendid! This is much more flexible than various static if aproaches like in D or modern C++.