This will allow users to construct e.g. a ComptimeStringMap that uses case-insensitive ASCII comparison.
Note: the previous ComptimeStringMap API is unchanged (i.e. this does not break any existing code).
We already have a LICENSE file that covers the Zig Standard Library. We
no longer need to remind everyone that the license is MIT in every single
file.
Previously this was introduced to clarify the situation for a fork of
Zig that made Zig's LICENSE file harder to find, and replaced it with
their own license that required annual payments to their company.
However that fork now appears to be dead. So there is no need to
reinforce the copyright notice in every single file.
Allows for iterating over the kvs when constructing with a list literal instead of having to create a separate array to pass into ComptimeStringMap in order to maintain access to the values.
For example when making a set, before in order to loop over the kvs you'd have to do something like:
const MyKV = struct { @"0": []const u8 };
const kvs: []const MyKV = &[_]MyKV{ .{ @"0" = "foo"}, .{ @"0" = "bar" } };
const map = ComptimeStringMap(void, kvs);
for (kvs) |kv| {}
whereas now it's possible to do:
const map = ComptimeStringMap(void, .{ .{"foo"}, .{"bar"} });
for (map.kvs) |kv| {}