Skip to content

Commit f7fe273

Browse files
Implement equals operator for 'box'
1 parent 463c4f9 commit f7fe273

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

include/geo/box.h

+4
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,10 @@ struct box {
8787
return lat_overlaps && lng_overlaps;
8888
}
8989

90+
friend bool operator==(box const& lhs, box const& rhs) noexcept {
91+
return lhs.min_ == rhs.min_ && lhs.max_ == rhs.max_;
92+
}
93+
9094
latlng min_, max_;
9195
};
9296

0 commit comments

Comments
 (0)