Skip to content

Expose completion as DSL event token#12

Merged
gabewillen merged 1 commit intomainfrom
codex/completion-token
Feb 24, 2026
Merged

Expose completion as DSL event token#12
gabewillen merged 1 commit intomainfrom
codex/completion-token

Conversation

@gabewillen
Copy link

Summary

  • expose sml::completion<T> as a first-class DSL token so transitions can be written as completion<T>
  • keep completion-event internals unchanged while removing the need to wrap with event<...> at call sites
  • update affected functional tests to validate direct completion<T> usage

Testing

  • ./scripts/quality_gates.sh
  • cmake --build build --target test_transitions test_actions_process_n_defer -j8 && ./build/test/ft/test_transitions && ./build/test/ft/test_actions_process_n_defer

Copilot AI review requested due to automatic review settings February 24, 2026 21:57
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR exposes sml::completion<T> as a first-class DSL event token, allowing it to be used directly in transition tables without wrapping it in event<...>. The implementation follows the same pattern as other internal event tokens like on_entry, on_exit, unexpected_event, and exception.

Changes:

  • Modified completion from a type alias to a variable template wrapped in front::event<back::completion<TEvent>>
  • Updated functional tests to use the simplified completion<T> syntax instead of event<completion<T>>

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
include/boost/sml.hpp Changed completion from type alias to variable template matching the pattern of other DSL event tokens (on_entry, on_exit, etc.)
test/ft/transitions.cpp Updated test to use simplified completion<e1> syntax instead of event<completion<e1>>
test/ft/actions_process_n_defer.cpp Updated tests to use simplified completion<T> syntax in multiple transition table definitions

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@gabewillen gabewillen merged commit a24bb30 into main Feb 24, 2026
14 checks passed
@gabewillen gabewillen deleted the codex/completion-token branch February 24, 2026 22:02
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.

2 participants