diff --git a/homog2d.hpp b/homog2d.hpp index f4f8a540..9aa65225 100644 --- a/homog2d.hpp +++ b/homog2d.hpp @@ -1479,11 +1479,8 @@ class Segment_ return !(*this == s2); } template - friend std::ostream& operator << ( std::ostream& f, const Segment_& seg ) - { - f << seg._ptS1 << "-" << seg._ptS2; - return f; - } + friend std::ostream& operator << ( std::ostream& f, const Segment_& seg ); + /// Returns the points as a std::pair /** The one with smallest x coordinate will be returned as "first". If x-coordinate are equal, then the one with smallest y-coordinate will be returned first */ @@ -1528,6 +1525,14 @@ the one with smallest y-coordinate will be returned first */ #endif }; +template +inline +std::ostream& operator << ( std::ostream& f, const Segment_& seg ) +{ + f << seg._ptS1 << "-" << seg._ptS2; + return f; +} + //------------------------------------------------------------------ /// Implementation of line::isParallelTo( Segment ) template