Skip to content

Modernize copy prevention in basic/ComparingTracer and MessageListenerFactory#673

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

Modernize copy prevention in basic/ComparingTracer and MessageListenerFactory#673
lyskov-ai wants to merge 1 commit intoRosettaCommons:mainfrom
lyskov-ai:refactor/basic-modernize-copy-prevention

Conversation

@lyskov-ai
Copy link
Copy Markdown
Contributor

Summary

Two related cleanups in basic/:

ComparingTracer.hh: Replace private-and-undefined copy constructor with public = delete; also explicitly delete copy assignment. The std::fstream member already makes copies impossible, but = delete documents the intent at the class level.

mpi/MessageListenerFactory.hh: Remove the redundant private-undefined copy constructor and copy assignment. MessageListenerFactory inherits from utility::SingletonBase<MessageListenerFactory>, which already deletes both copy operations — the manual declarations were dead code.

Test plan

  • python3 ./scons.py -j16 mode=debug passes

…rFactory

ComparingTracer: replace private-undefined copy ctor with public = delete;
also explicitly delete copy assignment (std::fstream member makes copies
impossible anyway, but = delete documents the intent clearly).

MessageListenerFactory: remove redundant private-undefined copy ctor and
assignment -- SingletonBase already deletes them via inheritance.
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