diff options
| author | 2015-10-26 19:13:32 +0000 | |
|---|---|---|
| committer | 2015-10-26 19:13:32 +0000 | |
| commit | 450f012957c2a63dec574fe6435a4f6569822a6b (patch) | |
| tree | 32a43b04b00808d00bba7c3e5f950dff403bdb7d | |
| parent | f230fee8de883ac5bb01b4674755e6c23aeed71c (diff) | |
| parent | 05ff5a4ad666d9eb583ff343c1cbba886d7621b1 (diff) | |
Merge "Make dchecked_vector C++11 compatible."
| -rw-r--r-- | runtime/base/dchecked_vector.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/runtime/base/dchecked_vector.h b/runtime/base/dchecked_vector.h index 6ec573a5fb..2bd12df2c3 100644 --- a/runtime/base/dchecked_vector.h +++ b/runtime/base/dchecked_vector.h @@ -59,8 +59,10 @@ class dchecked_vector : private std::vector<T, Alloc> { : Base() { } explicit dchecked_vector(const allocator_type& alloc) : Base(alloc) { } + // Note that we cannot forward to std::vector(size_type, const allocator_type&) because it is not + // available in C++11, which is the latest GCC can support. http://b/25022512 explicit dchecked_vector(size_type n, const allocator_type& alloc = allocator_type()) - : Base(n, alloc) { } + : Base(alloc) { resize(n); } dchecked_vector(size_type n, const value_type& value, const allocator_type& alloc = allocator_type()) |