feat(api)!: the two enum lists are spans over the tables - #892
Merged
Merged
Conversation
`all_file_types()` and `all_text_encodings()` allocated a vector on every call to project one column out of a constexpr table. Each table now projects that column at compile time, and the two lookups return a span like every other table lookup in the header. The bindings still hand out a list. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QNQ2GtyAXXWGvnKBtwTEhQ
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🤖 Generated with Claude Code
What
all_file_types()andall_text_encodings()allocated astd::vectoron every call to project one column out of aconstexprtable. Every other table lookup inodr.hppreturns astd::span<const …>, so these two were the outliers.file_type_table::types(),text_encoding_table::encodings()).std::span<const …>and arenoexcept.std::ranges::equal, since a span has nooperator==.Breaking for a C++ consumer that binds the result to a
std::vector. Lands in v7.0.0 with the other API breaks; a changelog entry is included.Checks
odr_test: the table and encoding suites pass.-Wall -Wextra -Werror.https://claude.ai/code/session_01QNQ2GtyAXXWGvnKBtwTEhQ