Skip to content

Modernize copy prevention in utility/signals classes to use = delete#668

Open
lyskov-ai wants to merge 1 commit intoRosettaCommons:mainfrom
lyskov-ai:refactor/signals-modernize-copy-prevention
Open

Modernize copy prevention in utility/signals classes to use = delete#668
lyskov-ai wants to merge 1 commit intoRosettaCommons:mainfrom
lyskov-ai:refactor/signals-modernize-copy-prevention

Conversation

@lyskov-ai
Copy link
Copy Markdown
Contributor

Summary

  • Replace old-style private-and-undefined copy constructor/assignment in five utility/signals classes with explicit = delete
  • Affected classes: SignalHub, BufferedSignalHub, PausableSignalHub, TokenHub, LinkUnit
  • Also explicitly deletes the LinkUnit default constructor (was previously also private-undefined)
  • Pure mechanical modernization — no behavioral change

Motivation

The pre-C++11 idiom of declaring copy ops private with no definition produces a linker error on misuse rather than a clear compile-time diagnostic. = delete gives an immediate, descriptive compiler error at the call site and is the modern idiomatic approach.

Test plan

  • python3 ./scons.py -j16 mode=debug passes (headers-only change; no behavioral difference)

Replace old-style private-and-undefined copy constructor/assignment
declarations with explicit = delete in SignalHub, BufferedSignalHub,
PausableSignalHub, TokenHub, and LinkUnit. Also deletes the LinkUnit
default constructor the same way.
@lyskov lyskov requested a review from roccomoretti May 1, 2026 17:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants