Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const std = @import("std");
- const builtin = @import("builtin");
- const typeinfo = builtin.TypeInfo;
- const typeid = builtin.TypeId;
- const S = builtin.TypeInfo.Struct;
- pub fn main() anyerror!void {
- const info = @typeInfo(std);
- switch (info) {
- typeinfo.Struct => |s| {
- for (s) |field| {
- }
- },
- else => unreachable,
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement