Skip to content

Modernize copy prevention in utility/graph EdgeList/Node/Edge to use = delete#672

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

Modernize copy prevention in utility/graph EdgeList/Node/Edge to use = delete#672
lyskov-ai wants to merge 1 commit intoRosettaCommons:mainfrom
lyskov-ai:refactor/graph-modernize-copy-prevention

Conversation

@lyskov-ai
Copy link
Copy Markdown
Contributor

Summary

Replace old-style private-and-undefined copy constructor/assignment with explicit = delete in six internal classes across Graph.hh and Digraph.hh:

  • Graph.hh: EdgeList, Node, Edge
  • Digraph.hh: DirectedEdgeList, DirectedNode, DirectedEdge

Also corrects the copy assignment signatures from the non-standard T& argument to the correct T const & form. The Graph class itself (which has a real, implemented copy constructor and assignment) is unchanged.

Test plan

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

Replace old-style private-and-undefined copy constructor/assignment in
Graph.hh (EdgeList, Node, Edge) and Digraph.hh (DirectedEdgeList,
DirectedNode, DirectedEdge) with explicit = delete. Also corrects the
copy assignment signatures from non-const T& to const T& to match the
standard copy assignment operator form.
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