Commit c7433dfc authored by Rodion Malinovsky's avatar Rodion Malinovsky

Add stack::HasAllocator

To check is it possible to expose allocator.
parent 8604ba0f
...@@ -134,6 +134,10 @@ public: ...@@ -134,6 +134,10 @@ public:
template<typename T> template<typename T>
T* Bottom() { return (T*)stack_; } T* Bottom() { return (T*)stack_; }
bool HasAllocator() const {
return allocator_ != 0;
}
Allocator& GetAllocator() { Allocator& GetAllocator() {
RAPIDJSON_ASSERT(allocator_); RAPIDJSON_ASSERT(allocator_);
return *allocator_; return *allocator_;
......
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