From 60fb523d629daebf73e604dbb909c763b49cb959 Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Wed, 21 Mar 2012 14:13:26 +0000 Subject: [PATCH] add some missing operators to LineAndColumn --- src/line_and_column.hh | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/src/line_and_column.hh b/src/line_and_column.hh index 17e4e8d2..bc19becf 100644 --- a/src/line_and_column.hh +++ b/src/line_and_column.hh @@ -51,10 +51,29 @@ struct LineAndColumn return column <= other.column; } + bool operator> (const EffectiveType& other) const + { + if (line != other.line) + return line > other.line; + return column > other.column; + } + + bool operator>= (const EffectiveType& other) const + { + if (line != other.line) + return line > other.line; + return column >= other.column; + } + bool operator== (const EffectiveType& other) const { return line == other.line and column == other.column; } + + bool operator!= (const EffectiveType& other) const + { + return line != other.line or column != other.column; + } }; }