Repository navigation
Conversation
std::function is copyable: copying it forks a stateful lambda's state, and it cannot hold move-only captures. MoveOnlyFunction is an alias of std::move_only_function where the standard library has it, and a minimal R(Args...) fallback for Apple's libc++, which lacks it. Tests: move-only capture, moving keeps one state, empty and nullptr comparison, reassignment; copy is rejected at compile time. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
… tests The standard does not make std::move_only_function's move assignment noexcept, and MSVC's STL does not. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
dayfine
added a commit
that referenced
this pull request
Nov 1, 2026
Both games plan on Grid and LegPlanner, so those stay here. The rest served one game each and moves to its user: ScreenMachine/StepTrace to common/screen-machine, LegWalker to frlg/brock-mvp (where LegMover is a small abstract class, so MoveOnlyFunction is no longer needed here), TileGrid and MapSet to bdsp/tilegrid-mapset. The MoveOnlyFunction copy of #72 goes with them. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
dayfine
added a commit
that referenced
this pull request
Nov 1, 2026
LegMover was an alias for a MoveOnlyFunction; a class with one virtual hold() (as the BDSP copy has) needs no callable wrapper, so the walker can leave the shared core and come along with FRLG without #72. FRLG's D-pad mover becomes DpadMover. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
dayfine
added a commit
that referenced
this pull request
Nov 1, 2026
StoryEvents holds its observations and actions in MoveOnlyFunctions. nav/core no longer includes the copy of #72, so it comes along here, byte-identical to common/move-only-function, and goes when #72 merges. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
This was referenced Nov 1, 2026
Owner
Author
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.
std::function is copyable, so copying one silently forks a stateful lambda's state, and it can't hold move-only captures. std::move_only_function fixes both, but Apple Clang's libc++ doesn't have it yet. MoveOnlyFunction is an alias of std::move_only_function where the library defines it (GCC, MSVC) and a small fallback elsewhere (macOS), with copying deleted. Tested with four unit tests on fork CI (Mac runs the fallback; Ubuntu and Windows clang run the std branch); migrating existing std::function uses comes next in small per-module batches.
🤖 Generated with Claude Code
https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E