Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Switch to GitLab Next
Sign in / Register
Toggle navigation
Open sidebar
cppit
libclangmm
Commits
736112b7
Commit
736112b7
authored
Feb 07, 2018
by
Florian Jung
Browse files
Added comparison ops >, <=, >= to SourceLocation
parent
997d02a8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
0 deletions
+3
-0
src/source_location.h
src/source_location.h
+3
-0
No files found.
src/source_location.h
View file @
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)
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment