diff options
Diffstat (limited to 'src/list.h')
-rw-r--r-- | src/list.h | 21 |
1 files changed, 21 insertions, 0 deletions
@@ -263,6 +263,27 @@ namespace Bu | |||
263 | return v; | 263 | return v; |
264 | } | 264 | } |
265 | 265 | ||
266 | MyType &push( const value &v ) | ||
267 | { | ||
268 | _hardCopy(); | ||
269 | prepend( v ); | ||
270 | |||
271 | return *this; | ||
272 | } | ||
273 | |||
274 | MyType &pop() | ||
275 | { | ||
276 | _hardCopy(); | ||
277 | erase( begin() ); | ||
278 | |||
279 | return *this; | ||
280 | } | ||
281 | |||
282 | value &peek() | ||
283 | { | ||
284 | return first(); | ||
285 | } | ||
286 | |||
266 | /** | 287 | /** |
267 | * Append a value to the list. | 288 | * Append a value to the list. |
268 | *@param v (const value_type &) The value to append. | 289 | *@param v (const value_type &) The value to append. |