From 06e64d7ccf053dbb11547edf3ba986d096b50045 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Tue, 31 Dec 2024 12:52:10 +0000 Subject: Add ArcSegment Extends Arc, with method for determining intersection point with line segment --- lib/stream_support.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'lib/stream_support.h') diff --git a/lib/stream_support.h b/lib/stream_support.h index f21622a..f5c5e37 100644 --- a/lib/stream_support.h +++ b/lib/stream_support.h @@ -4,6 +4,7 @@ #include #include #include +#include #include #include #include @@ -82,6 +83,16 @@ namespace std { { return s << EnumTypeDetails::typeName << "::" << EnumDetails::to_string(e).value(); } + + template + inline std::ostream & + operator<<(std::ostream & s, const std::optional & v) + { + if (v) { + return s << *v; + } + return s << "nullopt"; + } } template -- cgit v1.2.3