Add stack::HasAllocator

To check is it possible to expose allocator.
This commit is contained in:
Rodion Malinovsky 2015-09-16 14:53:51 +03:00
parent 8604ba0f1c
commit c7433dfc5e

View File

@ -134,6 +134,10 @@ public:
template<typename T>
T* Bottom() { return (T*)stack_; }
bool HasAllocator() const {
return allocator_ != 0;
}
Allocator& GetAllocator() {
RAPIDJSON_ASSERT(allocator_);
return *allocator_;