| author | |
| committer | |
| log | d1b32fbed72c5f00aee812447664948c3eec7006 |
| tree | 2350fdca79d8aa28555586340d1909ca022c4974 |
| parent | 0cbac546245ed1445a2892dbca662b632b11eb9f |
1 files changed, 6 insertions(+), 0 deletions(-)
src/lib.zig+6| ... | ... | @@ -269,3 +269,9 @@ pub fn positionalInit(comptime T: type, args: FieldsTuple(T)) T { |
| 269 | 269 | pub fn d2index(d1len: usize, d1: usize, d2: usize) usize { |
| 270 | 270 | return (d1len * d2) + d1; |
| 271 | 271 | } |
| 272 | ||
| 273 | pub fn ensureFieldSubset(comptime L: type, comptime R: type) void { | |
| 274 | for (std.meta.fields(L)) |item| { | |
| 275 | if (!@hasField(R, item.name)) @compileError(std.fmt.comptimePrint("{s} is missing the {s} field from {s}", .{ R, item.name, L })); | |
| 276 | } | |
| 277 | } |