Skip to content

Commit fcb23c2

Browse files
authored
Merge pull request #2008 from agate-pris/access-to-allocator-types
Access to allocator types
2 parents bdc49ad + 386d31a commit fcb23c2

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

include/rapidjson/document.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ class GenericDocument;
7575
User can define this to use CrtAllocator or MemoryPoolAllocator.
7676
*/
7777
#ifndef RAPIDJSON_DEFAULT_ALLOCATOR
78-
#define RAPIDJSON_DEFAULT_ALLOCATOR MemoryPoolAllocator<CrtAllocator>
78+
#define RAPIDJSON_DEFAULT_ALLOCATOR ::RAPIDJSON_NAMESPACE::MemoryPoolAllocator<::RAPIDJSON_NAMESPACE::CrtAllocator>
7979
#endif
8080

8181
/*! \def RAPIDJSON_DEFAULT_STACK_ALLOCATOR
@@ -85,7 +85,7 @@ class GenericDocument;
8585
User can define this to use CrtAllocator or MemoryPoolAllocator.
8686
*/
8787
#ifndef RAPIDJSON_DEFAULT_STACK_ALLOCATOR
88-
#define RAPIDJSON_DEFAULT_STACK_ALLOCATOR CrtAllocator
88+
#define RAPIDJSON_DEFAULT_STACK_ALLOCATOR ::RAPIDJSON_NAMESPACE::CrtAllocator
8989
#endif
9090

9191
/*! \def RAPIDJSON_VALUE_DEFAULT_OBJECT_CAPACITY
@@ -2486,6 +2486,7 @@ class GenericDocument : public GenericValue<Encoding, Allocator> {
24862486
typedef typename Encoding::Ch Ch; //!< Character type derived from Encoding.
24872487
typedef GenericValue<Encoding, Allocator> ValueType; //!< Value type of the document.
24882488
typedef Allocator AllocatorType; //!< Allocator type from template parameter.
2489+
typedef StackAllocator StackAllocatorType; //!< StackAllocator type from template parameter.
24892490

24902491
//! Constructor
24912492
/*! Creates an empty document of specified type.

0 commit comments

Comments
 (0)