Skip to content

Replace boost::signals2 with std::function#2

Draft
Copilot wants to merge 5 commits intodevelopfrom
copilot/replace-boost-signals-with-std-function
Draft

Replace boost::signals2 with std::function#2
Copilot wants to merge 5 commits intodevelopfrom
copilot/replace-boost-signals-with-std-function

Conversation

Copy link

Copilot AI commented Jan 27, 2026

Removes boost dependency by replacing boost::signals2::signal with std::function for UCI protocol callbacks.

Changes

  • Header (uci.hpp): Replaced all 11 signal declarations with std::function, added null checks before invocation
  • CMakeLists.txt: Removed boost find_package requirement
  • API: Callbacks now use direct assignment instead of .connect() method
  • Documentation: Updated usage examples and documented single-subscriber limitation

API Change

Before:

uci.receive_uci.connect([&]() {
  uci.send_id("Engine", "Author");
  uci.send_uci_ok();
});

After:

uci.receive_uci = [&]() {
  uci.send_id("Engine", "Author");
  uci.send_uci_ok();
};

Limitations

  • Each callback now supports single subscriber only (boost::signals2 supported multicast)
  • No built-in thread safety (boost::signals2 provided this)
Original prompt

Replace the boost signals dependency with std::function.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 4 commits January 27, 2026 20:34
Co-authored-by: acdemiralp <6049621+acdemiralp@users.noreply.github.com>
Co-authored-by: acdemiralp <6049621+acdemiralp@users.noreply.github.com>
Co-authored-by: acdemiralp <6049621+acdemiralp@users.noreply.github.com>
Co-authored-by: acdemiralp <6049621+acdemiralp@users.noreply.github.com>
Copilot AI changed the title [WIP] Replace boost signals dependency with std::function Replace boost::signals2 with std::function Jan 27, 2026
Copilot AI requested a review from acdemiralp January 27, 2026 20:37
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