Closed GoogleCodeExporter closed 8 years ago
i have the same problem ,now this problem have resolve or not ?
Original comment by linda080...@gmail.com
on 15 Apr 2013 at 7:44
i have the same problem ,now this problem have resolve or not ?
Original comment by linda080...@gmail.com
on 15 Apr 2013 at 7:44
Thansk to my colleague,we fix it. we change the declare of GenericValue and
GenericValue.member in "document.h"
//document.h
namespace rapidjson {
///////////////////////////////////////////////////////////////////////////////
// GenericValue
//! Represents a JSON value. Use Value for UTF8 encoding and default allocator.
/*!
A JSON value can be one of 7 types. This class is a variant type supporting
these types.
Use the Value if UTF8 and default allocator
\tparam Encoding Encoding of the value. (Even non-string values need to have the same encoding in a document)
\tparam Allocator Allocator type for allocating memory of object, array and string.
*/
#ifdef OS_SUN
#pragma pack (4)
#else
#pragma pack (push, 4)
#endif
template <typename Encoding, typename Allocator >
class GenericValue;
template <typename Encoding, typename Allocator >
class _Member {
public:
GenericValue<Encoding, Allocator> name; //!< name of member (must be a string)
GenericValue<Encoding, Allocator> value; //!< value of member.
} ;
template <typename Encoding, typename Allocator = MemoryPoolAllocator<> >
class GenericValue {
public:
//! Name-value pair in an object.
typedef _Member<Encoding, Allocator> Member;
typedef Encoding EncodingType; //!< Encoding type from template parameter.
typedef Allocator AllocatorType; //!< Allocator type from template parameter.
typedef typename Encoding::Ch Ch; //!< Character type derived from Encoding.
typedef Member* MemberIterator; //!< Member iterator for iterating in object.
typedef const Member* ConstMemberIterator; //!< Constant member iterator for iterating in object.
typedef GenericValue* ValueIterator; //!< Value iterator for iterating in array.
typedef const GenericValue* ConstValueIterator; //!< Constant value iterator for iterating in array.
///the rest is the same.....
Original comment by kingcjj...@gmail.com
on 21 Apr 2013 at 3:03
Attachments:
we fix it. we change the declare of GenericValue and
GenericValue.member in "document.h"
//document.h
namespace rapidjson {
///////////////////////////////////////////////////////////////////////////////
// GenericValue
//! Represents a JSON value. Use Value for UTF8 encoding and default allocator.
/*!
A JSON value can be one of 7 types. This class is a variant type supporting
these types.
Use the Value if UTF8 and default allocator
\tparam Encoding Encoding of the value. (Even non-string values need
to have the same encoding in a document)
\tparam Allocator Allocator type for allocating memory of object,
array and string.
*/
#ifdef OS_SUN
#pragma pack (4)
#else
#pragma pack (push, 4)
#endiftemplate <typename Encoding, typename Allocator >
class GenericValue;
template <typename Encoding, typename Allocator >
class _Member {
public:
GenericValue<Encoding, Allocator> name; //!< name of member (must
be a string)
GenericValue<Encoding, Allocator> value; //!< value of member.
} ;
template <typename Encoding, typename Allocator = MemoryPoolAllocator<> >
class GenericValue {
public:
//! Name-value pair in an object.
typedef _Member<Encoding, Allocator> Member;
typedef Encoding EncodingType; //!< Encoding type from template parameter.
typedef Allocator AllocatorType; //!< Allocator type from template
parameter.
typedef typename Encoding::Ch Ch; //!< Character type derived from Encoding.
typedef Member* MemberIterator; //!< Member iterator for
iterating in object.
typedef const Member* ConstMemberIterator; //!< Constant member
iterator for iterating in object.
typedef GenericValue* ValueIterator; //!< Value iterator for
iterating in array.
typedef const GenericValue* ConstValueIterator; //!< Constant value
iterator for iterating in array.
///the rest is the same.....
Original comment by kingcjj...@gmail.com
on 21 Apr 2013 at 3:05
any changes to have this fix applied in trunk?
Original comment by olex...@gmail.com
on 7 Aug 2013 at 6:48
Merged at https://github.com/miloyip/rapidjson/pull/33
_Member is named as GenericMember
I don't have the compiler mentioned. Please help verify. Thank you.
Original comment by milo...@gmail.com
on 30 Jun 2014 at 11:14
Original issue reported on code.google.com by
kingcjj...@gmail.com
on 10 Apr 2013 at 7:20