aboutsummaryrefslogtreecommitdiff
path: root/lib/libcxx/src/format.cpp
diff options
context:
space:
mode:
authorRyan Liptak <squeek502@hotmail.com>2021-08-13 16:16:29 -0700
committerRyan Liptak <squeek502@hotmail.com>2021-08-13 16:22:56 -0700
commit7e07df06a4f1507be216c84b034167cdee1817f7 (patch)
tree4a7aa2c694cd784f5d4a3c85418621d8b1612d49 /lib/libcxx/src/format.cpp
parent8ff49966bc9d6d7438640fa475e95f9a24a4b931 (diff)
downloadzig-7e07df06a4f1507be216c84b034167cdee1817f7.tar.gz
zig-7e07df06a4f1507be216c84b034167cdee1817f7.zip
ComptimeStringMap: expose kvs array in returned struct
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| {}
Diffstat (limited to 'lib/libcxx/src/format.cpp')
0 files changed, 0 insertions, 0 deletions