Skip to content

std.ComptimeStringMap: allow getting kv index#18409

Merged
Vexu merged 1 commit into
ziglang:masterfrom
nektro:patch-13
Jan 2, 2024
Merged

std.ComptimeStringMap: allow getting kv index#18409
Vexu merged 1 commit into
ziglang:masterfrom
nektro:patch-13

Conversation

@nektro

@nektro nektro commented Dec 30, 2023

Copy link
Copy Markdown
Contributor

this allows getting the index of str into kvs. this is useful because kvs[index].key will be a comptime stable string and str might not always be, so if you want it to persist pulling the string out of the CSM is better.

@v3nntrnx

Copy link
Copy Markdown

LGTM!

Comment thread lib/std/comptime_string_map.zig Outdated
@Vexu
Vexu enabled auto-merge (rebase) January 2, 2024 15:39
@Vexu
Vexu disabled auto-merge January 2, 2024 15:40
@Vexu
Vexu merged commit e19219f into ziglang:master Jan 2, 2024
@nektro
nektro deleted the patch-13 branch January 2, 2024 19:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants