You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 28, 2023. It is now read-only.
In tree-like structures, the behavior of the default comparison
operators (operator== and operator!=) is not intuitive. They may
compare individual tree nodes or the subtrees rooted at those nodes.
Replace the equality comparison operator on ScheduleTree with the
treeEquals method, which makes it clear that subtrees are compared (as
opposed to nodeEquals introduced previously).
Removing the overloaded comparison operators may make it harder to use
standard containers and algorithms on ScheduleTrees. However, the
caller is never supposed to operate on ScheduleTrees by-value, and
pointers are trivially comparable. Internal functions may define and
use a comparator class with clear intended behavior when necessary. For
external uses, explicitly-named functions offer a better alternative.
0 commit comments