summaryrefslogtreecommitdiff
path: root/decoder/small_vector.h
diff options
context:
space:
mode:
Diffstat (limited to 'decoder/small_vector.h')
-rw-r--r--decoder/small_vector.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/decoder/small_vector.h b/decoder/small_vector.h
index 7ed99e77..25c52359 100644
--- a/decoder/small_vector.h
+++ b/decoder/small_vector.h
@@ -25,12 +25,15 @@ class SmallVector {
typedef T const* const_iterator;
typedef T* iterator;
+ typedef T value_type;
+ typedef T &reference;
+ typedef T const& const_reference;
+
T *begin() { return size_>SV_MAX?data_.ptr:data_.vals; }
T const* begin() const { return const_cast<Self*>(this)->begin(); }
T *end() { return begin()+size_; }
T const* end() const { return begin()+size_; }
-
explicit SmallVector(size_t s) : size_(s) {
assert(s < 0xA000);
if (s <= SV_MAX) {