Skip to content

Remove _where context#72

Merged
saki7 merged 1 commit intoboostorg:developfrom
saki7:remove-_where-context
Oct 10, 2025
Merged

Remove _where context#72
saki7 merged 1 commit intoboostorg:developfrom
saki7:remove-_where-context

Conversation

@saki7
Copy link
Collaborator

@saki7 saki7 commented Oct 9, 2025

Part of #1

According to the GitHub full text search, x3::_where has almost zero use case. We simply remove it now.

Additionally, the old codebase allowed semantic action to be defined in a form like [](auto& ctx) { /* ... */}, which chokes on prvalue context. If we keep that behavior, we must always create a local context variable just for inventing lvalue reference. As a resolution, this PR prohibits lvalue-only functor definition in the first place and guides users to define [](auto&& ctx) { /* ... */ } instead.

The removal of _where context and the temporary context variable results in complete elimination of unused references created by the core parsers, finalizing our context-related optimization in X4.

@saki7 saki7 self-assigned this Oct 9, 2025
@saki7 saki7 added the enhancement New feature or request label Oct 9, 2025
@saki7 saki7 mentioned this pull request Oct 9, 2025
@saki7 saki7 marked this pull request as ready for review October 10, 2025 00:34
@saki7 saki7 merged commit 6edd6e4 into boostorg:develop Oct 10, 2025
13 checks passed
@saki7 saki7 deleted the remove-_where-context branch October 10, 2025 00:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant