Skip to content

const-correct comparisons#312

Open
ahcorde wants to merge 4 commits into
rollingfrom
ahcorde/rolling/const_correct
Open

const-correct comparisons#312
ahcorde wants to merge 4 commits into
rollingfrom
ahcorde/rolling/const_correct

Conversation

@ahcorde

@ahcorde ahcorde commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Description

  • MessageEvent's operator< and operator== const (fixing a bug where const instances couldn't be compared)
  • Deleted the now-redundant operator!= since C++20 synthesizes it from ==,
  • rclcpp::Time comparisons throw on mismatched clock sources.

Did you use Generative AI?

Claude opus 4.7

ahcorde added 3 commits June 16, 2026 10:44
Signed-off-by: Alejandro Hernandez Cordero <ahcorde@gmail.com>
…red in signalX.hpp

Signed-off-by: Alejandro Hernandez Cordero <ahcorde@gmail.com>
Signed-off-by: Alejandro Hernandez Cordero <ahcorde@gmail.com>
@ahcorde ahcorde requested review from asymingt and mjcarroll June 16, 2026 09:02
@ahcorde ahcorde self-assigned this Jun 16, 2026
}

bool operator==(const MessageEvent<M> & rhs)
// operator!= is synthesized from operator== by C++20's rewritten candidates.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is clearly an AI comment. Please remove it. Comments should reflect the code's current state, not this delta with respect to the previous commit.

Signed-off-by: Alejandro Hernandez Cordero <ahcorde@gmail.com>
@ahcorde ahcorde requested a review from asymingt June 17, 2026 19:32
Base automatically changed from ahcorde/rolling/signal_make_shared to rolling June 18, 2026 10:51
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