Skip to content

Commit

Permalink
Add stack::HasAllocator
Browse files Browse the repository at this point in the history
To check is it possible to expose allocator.
  • Loading branch information
malirod committed Sep 16, 2015
1 parent 8604ba0 commit c7433df
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions include/rapidjson/internal/stack.h
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,10 @@ class Stack {
template<typename T>
T* Bottom() { return (T*)stack_; }

bool HasAllocator() const {
return allocator_ != 0;
}

Allocator& GetAllocator() {
RAPIDJSON_ASSERT(allocator_);
return *allocator_;
Expand Down

0 comments on commit c7433df

Please sign in to comment.