From 74b233d5d151d1a0573cfbbfb399d6a058de358e Mon Sep 17 00:00:00 2001 From: q66 Date: Sat, 1 Aug 2015 20:25:02 +0100 Subject: [PATCH] add Vector::advance --- ostd/vector.hh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ostd/vector.hh b/ostd/vector.hh index ebd42d6..121d251 100644 --- a/ostd/vector.hh +++ b/ostd/vector.hh @@ -346,6 +346,8 @@ public: Size size() const { return p_len; } Size capacity() const { return p_cap; } + void advance(Size s) { p_len += s; } + Size max_size() const { return Size(~0) / sizeof(T); } bool empty() const { return (p_len == 0); }