summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMaxime Coste <frrrwww@gmail.com>2012-03-21 14:13:26 +0000
committerMaxime Coste <frrrwww@gmail.com>2012-03-21 14:13:26 +0000
commit60fb523d629daebf73e604dbb909c763b49cb959 (patch)
tree73507f55ec50fb5eb979e79dcfc00ccfdc5351f4 /src
parent3dd82a2b8515fccbd5a31a90f5da4d969dbb4a23 (diff)
add some missing operators to LineAndColumn
Diffstat (limited to 'src')
-rw-r--r--src/line_and_column.hh19
1 files changed, 19 insertions, 0 deletions
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;
+ }
};
}