Commit bb7b7984 authored by Ole Christian Eidheim's avatar Ole Christian Eidheim
Browse files

Merge branch 'comparison_operators' of

parents e4009462 736112b7
......@@ -10,6 +10,9 @@ namespace clangmm {
bool operator==(const Offset &o) const {return line==o.line && index==o.index;}
bool operator!=(const Offset &o) const {return !(*this==o);}
bool operator<(const Offset &o) const {return line<o.line || (line==o.line && index<o.index);}
bool operator>(const Offset &o) const {return o < *this;}
bool operator<=(const Offset &o) const {return (*this == o) || (*this < o);}
bool operator>=(const Offset &o) const {return (*this == o) || (*this > o);}
unsigned line;
unsigned index; //byte index in line (not char number)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment