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
87d4e07f
Unverified
Commit
87d4e07f
authored
Dec 13, 2017
by
Milo Yip
Committed by
GitHub
Dec 13, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1137 from pah/fixes/1131-iterator-deprecation
Avoid inheritance from std::iterator
parents
7caa4b21
d75bb90a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
8 deletions
+14
-8
document.h
include/rapidjson/document.h
+14
-8
No files found.
include/rapidjson/document.h
View file @
87d4e07f
...
...
@@ -45,7 +45,7 @@ RAPIDJSON_DIAG_OFF(terminate) // ignore throwing RAPIDJSON_ASSERT in RAPIDJSON_N
#endif // __GNUC__
#ifndef RAPIDJSON_NOMEMBERITERATORCLASS
#include <iterator> // std::
iterator, std::
random_access_iterator_tag
#include <iterator> // std::random_access_iterator_tag
#endif
#if RAPIDJSON_HAS_CXX11_RVALUE_REFS
...
...
@@ -98,16 +98,13 @@ struct GenericMember {
\see GenericMember, GenericValue::MemberIterator, GenericValue::ConstMemberIterator
*/
template
<
bool
Const
,
typename
Encoding
,
typename
Allocator
>
class
GenericMemberIterator
:
public
std
::
iterator
<
std
::
random_access_iterator_tag
,
typename
internal
::
MaybeAddConst
<
Const
,
GenericMember
<
Encoding
,
Allocator
>
>::
Type
>
{
class
GenericMemberIterator
{
friend
class
GenericValue
<
Encoding
,
Allocator
>
;
template
<
bool
,
typename
,
typename
>
friend
class
GenericMemberIterator
;
typedef
GenericMember
<
Encoding
,
Allocator
>
PlainType
;
typedef
typename
internal
::
MaybeAddConst
<
Const
,
PlainType
>::
Type
ValueType
;
typedef
std
::
iterator
<
std
::
random_access_iterator_tag
,
ValueType
>
BaseType
;
public
:
//! Iterator type itself
...
...
@@ -117,12 +114,21 @@ public:
//! Non-constant iterator type
typedef
GenericMemberIterator
<
false
,
Encoding
,
Allocator
>
NonConstIterator
;
/** \name std::iterator_traits support */
//@{
typedef
ValueType
value_type
;
typedef
ValueType
*
pointer
;
typedef
ValueType
&
reference
;
typedef
std
::
ptrdiff_t
difference_type
;
typedef
std
::
random_access_iterator_tag
iterator_category
;
//@}
//! Pointer to (const) GenericMember
typedef
typename
BaseType
::
pointer
Pointer
;
typedef
pointer
Pointer
;
//! Reference to (const) GenericMember
typedef
typename
BaseType
::
reference
Reference
;
typedef
reference
Reference
;
//! Signed integer type (e.g. \c ptrdiff_t)
typedef
typename
BaseType
::
difference_type
DifferenceType
;
typedef
difference_type
DifferenceType
;
//! Default constructor (singular value)
/*! Creates an iterator pointing to no element.
...
...
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