Skip to content

Fix issue 171: avoid double dispatch for wildcard event#9

Merged
gabewillen merged 1 commit intomainfrom
issu_171
Feb 23, 2026
Merged

Fix issue 171: avoid double dispatch for wildcard event#9
gabewillen merged 1 commit intomainfrom
issu_171

Conversation

@gabewillen
Copy link

Summary:

  • fix wildcard mapping so wildcard event does not participate in anonymous event dispatch
  • add regression test test/ft/issue_171.cpp covering the upstream repro
  • register test_issue_171 in test/ft/CMakeLists.txt

Reference:

Copilot AI review requested due to automatic review settings February 23, 2026 23:15
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 fixes issue boost-ext#171 where wildcard events (event<_>) were being dispatched twice - once for the wildcard handler and once for the anonymous event dispatch mechanism. The fix ensures that anonymous events, which are internal events used for automatic transitions, do not participate in wildcard event dispatch.

Changes:

  • Added template specialization for anonymous events to bypass wildcard event dispatch logic
  • Added regression test to verify wildcard events are only fired once
  • Registered the new test in the CMake build system

Reviewed changes

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

File Description
include/boost/sml.hpp Added get_event_mapping_impl_helper specialization for anonymous to prevent double dispatch with wildcard events
test/ft/issue_171.cpp Added regression test verifying wildcard events fire exactly once, not twice
test/ft/CMakeLists.txt Registered the new test_issue_171 test executable and test case

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

@gabewillen gabewillen merged commit 52f2564 into main Feb 23, 2026
14 checks passed
@gabewillen gabewillen deleted the issu_171 branch February 23, 2026 23:35
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