Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
R
rapidjson
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
rapidjson
Commits
26c24d0b
Commit
26c24d0b
authored
Aug 21, 2014
by
Philipp A. Hartmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
GenericMemberIterator: allow mixed-constness comparisons and differences
parent
618fe2f4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
10 deletions
+10
-10
document.h
include/rapidjson/document.h
+10
-10
No files found.
include/rapidjson/document.h
View file @
26c24d0b
...
...
@@ -118,9 +118,9 @@ public:
//! Iterator type itself
typedef
GenericMemberIterator
Iterator
;
//! Constant iterator type
typedef
GenericMemberIterator
<
true
,
Encoding
,
Allocator
>
Const
Type
;
typedef
GenericMemberIterator
<
true
,
Encoding
,
Allocator
>
Const
Iterator
;
//! Non-constant iterator type
typedef
GenericMemberIterator
<
false
,
Encoding
,
Allocator
>
NonConst
Type
;
typedef
GenericMemberIterator
<
false
,
Encoding
,
Allocator
>
NonConst
Iterator
;
//! Pointer to (const) GenericMember
typedef
typename
BaseType
::
pointer
Pointer
;
...
...
@@ -151,7 +151,7 @@ public:
constructor effectively defines a regular copy-constructor.
Otherwise, the copy constructor is implicitly defined.
*/
GenericMemberIterator
(
const
NonConst
Type
&
it
)
:
ptr_
(
it
.
ptr_
)
{}
GenericMemberIterator
(
const
NonConst
Iterator
&
it
)
:
ptr_
(
it
.
ptr_
)
{}
//! @name stepping
//@{
...
...
@@ -172,12 +172,12 @@ public:
//! @name relations
//@{
bool
operator
==
(
Iterator
that
)
const
{
return
ptr_
==
that
.
ptr_
;
}
bool
operator
!=
(
Iterator
that
)
const
{
return
ptr_
!=
that
.
ptr_
;
}
bool
operator
<=
(
Iterator
that
)
const
{
return
ptr_
<=
that
.
ptr_
;
}
bool
operator
>=
(
Iterator
that
)
const
{
return
ptr_
>=
that
.
ptr_
;
}
bool
operator
<
(
Iterator
that
)
const
{
return
ptr_
<
that
.
ptr_
;
}
bool
operator
>
(
Iterator
that
)
const
{
return
ptr_
>
that
.
ptr_
;
}
bool
operator
==
(
Const
Iterator
that
)
const
{
return
ptr_
==
that
.
ptr_
;
}
bool
operator
!=
(
Const
Iterator
that
)
const
{
return
ptr_
!=
that
.
ptr_
;
}
bool
operator
<=
(
Const
Iterator
that
)
const
{
return
ptr_
<=
that
.
ptr_
;
}
bool
operator
>=
(
Const
Iterator
that
)
const
{
return
ptr_
>=
that
.
ptr_
;
}
bool
operator
<
(
Const
Iterator
that
)
const
{
return
ptr_
<
that
.
ptr_
;
}
bool
operator
>
(
Const
Iterator
that
)
const
{
return
ptr_
>
that
.
ptr_
;
}
//@}
//! @name dereference
...
...
@@ -188,7 +188,7 @@ public:
//@}
//! Distance
DifferenceType
operator
-
(
Iterator
that
)
const
{
return
ptr_
-
that
.
ptr_
;
}
DifferenceType
operator
-
(
Const
Iterator
that
)
const
{
return
ptr_
-
that
.
ptr_
;
}
private
:
//! Internal constructor from plain pointer
...
...
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