Skip to content

Commit

Permalink
Implement equals operator for 'box' (#14)
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelKutzner authored Oct 23, 2024
1 parent 463c4f9 commit cee1720
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions include/geo/box.h
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,10 @@ struct box {
return lat_overlaps && lng_overlaps;
}

friend bool operator==(box const& lhs, box const& rhs) noexcept {
return lhs.min_ == rhs.min_ && lhs.max_ == rhs.max_;
}

latlng min_, max_;
};

Expand Down

0 comments on commit cee1720

Please sign in to comment.