{"action":"opened","issue":{"url":"https://api.github.com/repos/miloyip/rapidjson/issues/483","labels_url":"https://api.github.com/repos/miloyip/rapidjson/issues/483/labels{/name}","comments_url":"https://api.github.com/repos/miloyip/rapidjson/issues/483/comments","events_url":"https://api.github.com/repos/miloyip/rapidjson/issues/483/events","html_url":"https://github.com/miloyip/rapidjson/issues/483","id":119440928,"number":483,"title":"Unable to use customized Allocator, pointer.h line 393","user":{"login":"frankyueh","id":3252086,"avatar_url":"https://avatars.githubusercontent.com/u/3252086?v=3","gravatar_id":"","url":"https://api.github.com/users/frankyueh","html_url":"https://github.com/frankyueh","followers_url":"https://api.github.com/users/frankyueh/followers","following_url":"https://api.github.com/users/frankyueh/following{/other_user}","gists_url":"https://api.github.com/users/frankyueh/gists{/gist_id}","starred_url":"https://api.github.com/users/frankyueh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/frankyueh/subscriptions","organizations_url":"https://api.github.com/users/frankyueh/orgs","repos_url":"https://api.github.com/users/frankyueh/repos","events_url":"https://api.github.com/users/frankyueh/events{/privacy}","received_events_url":"https://api.github.com/users/frankyueh/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-11-30T08:22:57Z","updated_at":"2015-11-30T08:22:57Z","closed_at":null,"body":"I want to use a customized Allocator for Rapidjson and defined as below:\r\n```\r\nnamespace myjson {\r\n\r\nclass MyAllocator\r\n{\r\npublic:\r\n    static const bool kNeedFree = true;\r\n    void * Malloc(size_t _size);\r\n    void * Realloc(void *_org_p, size_t _org_size, size_t _new_size);\r\n    static void Free(void *_p);\r\n};\r\n\r\ntypedef rapidjson::GenericDocument<\r\n            rapidjson::UTF8<>,\r\n            rapidjson::MemoryPoolAllocator< MyAllocator >,\r\n            MyAllocator\r\n        > Document;\r\n\r\ntypedef rapidjson::GenericPointer<\r\n            ::myjson::Document::ValueType,\r\n            MyAllocator\r\n        > Pointer;\r\n\r\ntypedef ::myjson::Document::ValueType Value;\r\n\r\n}\r\n```\r\nAnd the usage code:\r\n```\r\nmyjson::Document document;\r\nmyjson::Value value(rapidjson::kStringType);\r\nvalue.SetString(mystr.c_str(), mystr.length(), document.GetAllocator());\r\nmyjson::Pointer(path.c_str()).Set(document, value, document.GetAllocator());\r\n```\r\n\r\nBut it does not pass the compiling, also I discovered the issue is causing from the source code pointer.h line 393: (similar issue at line 411 and 419 too)\r\n```\r\nv->PushBack(Value().Move(), allocator);\r\n// Value is GenericValue<UTF8<> >, cannot convert to GenericValue<UTF8<>, myjson::MyAllocator>\r\n```\r\n\r\nMaybe it should be correct by the declare `typedef typename ValueType::ValueType Value;` inside of Pointer class?"}}