mirror of
https://github.com/id-Software/DOOM-3-BFG.git
synced 2025-04-24 10:38:53 +00:00
Update rapidjson lib to remove deprecated std::iterator template and replace with required iterator types
This commit is contained in:
parent
16077c7cd6
commit
a67a100f19
1 changed files with 14 additions and 8 deletions
|
@ -106,16 +106,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
|
||||
|
@ -125,12 +122,21 @@ public:
|
|||
//! Non-constant iterator type
|
||||
typedef GenericMemberIterator<false,Encoding,Allocator> NonConstIterator;
|
||||
|
||||
//! Pointer to (const) GenericMember
|
||||
typedef typename BaseType::pointer Pointer;
|
||||
/** \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 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.
|
||||
|
|
Loading…
Reference in a new issue