From f7fe2739553e990ccc45563b17fc4008ac0a1841 Mon Sep 17 00:00:00 2001 From: Michael Kutzner <174690291+MichaelKutzner@users.noreply.github.com> Date: Wed, 23 Oct 2024 13:41:33 +0200 Subject: [PATCH] Implement equals operator for 'box' --- include/geo/box.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/geo/box.h b/include/geo/box.h index 63b6bd9..a87c22f 100644 --- a/include/geo/box.h +++ b/include/geo/box.h @@ -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_; };