diff options
author | Milo Yip <miloyip@gmail.com> | 2022-04-06 07:28:13 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-06 07:28:13 +0300 |
commit | fcb23c2dbf561ec0798529be4f66394d3e4996d8 (patch) | |
tree | 595afea3207f6faa32f2cf375ca5fe1d6ee30d88 | |
parent | bdc49ad80a3cff89a25839dcdcd6a68b457ec9f1 (diff) | |
parent | 386d31ab69c38e3798200d21eb02ea62c98c4591 (diff) |
Merge pull request #2008 from agate-pris/access-to-allocator-types
Access to allocator types
-rw-r--r-- | include/rapidjson/document.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/include/rapidjson/document.h b/include/rapidjson/document.h index 1cdc29c0..74089cb9 100644 --- a/include/rapidjson/document.h +++ b/include/rapidjson/document.h @@ -75,7 +75,7 @@ class GenericDocument; User can define this to use CrtAllocator or MemoryPoolAllocator. */ #ifndef RAPIDJSON_DEFAULT_ALLOCATOR -#define RAPIDJSON_DEFAULT_ALLOCATOR MemoryPoolAllocator<CrtAllocator> +#define RAPIDJSON_DEFAULT_ALLOCATOR ::RAPIDJSON_NAMESPACE::MemoryPoolAllocator<::RAPIDJSON_NAMESPACE::CrtAllocator> #endif /*! \def RAPIDJSON_DEFAULT_STACK_ALLOCATOR @@ -85,7 +85,7 @@ class GenericDocument; User can define this to use CrtAllocator or MemoryPoolAllocator. */ #ifndef RAPIDJSON_DEFAULT_STACK_ALLOCATOR -#define RAPIDJSON_DEFAULT_STACK_ALLOCATOR CrtAllocator +#define RAPIDJSON_DEFAULT_STACK_ALLOCATOR ::RAPIDJSON_NAMESPACE::CrtAllocator #endif /*! \def RAPIDJSON_VALUE_DEFAULT_OBJECT_CAPACITY @@ -2486,6 +2486,7 @@ public: typedef typename Encoding::Ch Ch; //!< Character type derived from Encoding. typedef GenericValue<Encoding, Allocator> ValueType; //!< Value type of the document. typedef Allocator AllocatorType; //!< Allocator type from template parameter. + typedef StackAllocator StackAllocatorType; //!< StackAllocator type from template parameter. //! Constructor /*! Creates an empty document of specified type. |