Commit 2e156cca authored by Milo Yip's avatar Milo Yip

Merge pull request #33 from miloyip/MoveStructMember

Fixes IBM XL C/C++ for AIX issue
parents a2240e26 a9356c09
...@@ -12,6 +12,22 @@ ...@@ -12,6 +12,22 @@
namespace rapidjson { namespace rapidjson {
// Forward declaration.
template <typename Encoding, typename Allocator>
class GenericValue;
//! Name-value pair in an object.
/*!
This class was internal to GenericValue. It used to be a inner struct.
But a compiler (IBM XL C/C++ for AIX) have reported to have problem with that so it moved as a namespace scope struct.
https://code.google.com/p/rapidjson/issues/detail?id=64
*/
template <typename Encoding, typename Allocator>
struct GenericMember {
GenericValue<Encoding, Allocator> name; //!< name of member (must be a string)
GenericValue<Encoding, Allocator> value; //!< value of member.
};
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
// GenericValue // GenericValue
...@@ -30,11 +46,7 @@ template <typename Encoding, typename Allocator = MemoryPoolAllocator<> > ...@@ -30,11 +46,7 @@ template <typename Encoding, typename Allocator = MemoryPoolAllocator<> >
class GenericValue { class GenericValue {
public: public:
//! Name-value pair in an object. //! Name-value pair in an object.
struct Member { typedef GenericMember<Encoding, Allocator> Member;
GenericValue<Encoding, Allocator> name; //!< name of member (must be a string)
GenericValue<Encoding, Allocator> value; //!< value of member.
};
typedef Encoding EncodingType; //!< Encoding type from template parameter. typedef Encoding EncodingType; //!< Encoding type from template parameter.
typedef Allocator AllocatorType; //!< Allocator type from template parameter. typedef Allocator AllocatorType; //!< Allocator type from template parameter.
typedef typename Encoding::Ch Ch; //!< Character type derived from Encoding. typedef typename Encoding::Ch Ch; //!< Character type derived from Encoding.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment