Index: base/containers/stack_container.h |
diff --git a/base/containers/stack_container.h b/base/containers/stack_container.h |
index f0106d73f212dbe3864e6166366ba9f595b7233c..87fa0369b6a4f9e05b3fc69c5ed9eab39247205b 100644 |
--- a/base/containers/stack_container.h |
+++ b/base/containers/stack_container.h |
@@ -90,6 +90,13 @@ class StackAllocator : public std::allocator<T> { |
: source_(NULL) { |
} |
+ // This constructor must exist. It creates a default allocator that doesn't |
+ // actually have a stack buffer. glibc's std::string() will compare the |
+ // current allocator against the default-constructed allocator, so this |
+ // should be fast. |
+ StackAllocator() : source_(NULL) { |
+ } |
+ |
explicit StackAllocator(Source* source) : source_(source) { |
} |