Skip to content

feat(data): add as_cxpr_array - #8

Merged
codethinki merged 1 commit into
masterfrom
feat/as-cxpr-array
Oct 5, 2026
Merged

codethinki merged 1 commit into
masterfrom
feat/as-cxpr-array

Conversation

@codethinki

Copy link
Copy Markdown
Owner

cth::dt::as_cxpr_array<Generator>() copies the range returned by a constexpr generator into a std::array, so results computed with constexpr std::vector can outlive constant evaluation:

constexpr auto splits = cth::dt::as_cxpr_array<[] { return lbs::split(WORD_LIST_CSV, ','); }>();

letter_boxed_solver uses it to split its embedded word list at compile time.

Copies the range returned by a constexpr generator into a std::array, so
results computed with constexpr std::vector can outlive constant evaluation.
@codethinki
codethinki merged commit 3de9bd4 into master Oct 5, 2026
6 checks passed
@codethinki
codethinki deleted the feat/as-cxpr-array branch October 5, 2026 00:38
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.

1 participant