Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions CPP/Clipper2Lib/include/clipper2/clipper.core.h
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,10 @@ namespace Clipper2Lib

inline void Negate() { x = -x; y = -y; }

#if __cpp_impl_three_way_comparison >= 201907L
constexpr auto operator<=>(const Point&) const = default;
#endif

};

//nb: using 'using' here (instead of typedef) as they can be used in templates
Expand Down Expand Up @@ -400,6 +404,9 @@ namespace Clipper2Lib
os << "(" << rect.left << "," << rect.top << "," << rect.right << "," << rect.bottom << ") ";
return os;
}
#if __cpp_impl_three_way_comparison >= 201907L
constexpr auto operator<=>(const Rect&) const = default;
#endif
};

template <typename T1, typename T2>
Expand Down