Make GenericMemberIterator::Iterator public again (RAPIDJSON_NOMEMBERITERATORCLASS)

d87b698d0f made all definitions of GenericMemberIterator consistent as
classes (they were structs with RAPIDJSON_NOMEMBERITERATORCLASS
defined), but it didn't keep the member definitions public.

document.h:586:71: error: 'Iterator' is a private member of
      'rapidjson::GenericMemberIterator<false, rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >'
    typedef typename GenericMemberIterator<false,Encoding,Allocator>::Iterator MemberIterator;  //!< Member iterator for i...
                                                                      ^
document.h:2124:32: note: in instantiation of template class
      'rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >' requested here
class GenericDocument : public GenericValue<Encoding, Allocator> {
This commit is contained in:
Eric Rannaud 2019-09-12 08:57:36 -07:00
parent fcec7735dc
commit ebc003e205

View File

@ -210,12 +210,14 @@ class GenericMemberIterator;
//! non-const GenericMemberIterator //! non-const GenericMemberIterator
template <typename Encoding, typename Allocator> template <typename Encoding, typename Allocator>
class GenericMemberIterator<false,Encoding,Allocator> { class GenericMemberIterator<false,Encoding,Allocator> {
public:
//! use plain pointer as iterator type //! use plain pointer as iterator type
typedef GenericMember<Encoding,Allocator>* Iterator; typedef GenericMember<Encoding,Allocator>* Iterator;
}; };
//! const GenericMemberIterator //! const GenericMemberIterator
template <typename Encoding, typename Allocator> template <typename Encoding, typename Allocator>
class GenericMemberIterator<true,Encoding,Allocator> { class GenericMemberIterator<true,Encoding,Allocator> {
public:
//! use plain const pointer as iterator type //! use plain const pointer as iterator type
typedef const GenericMember<Encoding,Allocator>* Iterator; typedef const GenericMember<Encoding,Allocator>* Iterator;
}; };