Change this deque's size to newSize, using value for new elements.

Synopsis

Declared in <bslstl_deque.h>

void
resize(
    size_type newSize,
    VALUE_TYPE const& value);

Description

Change the size of this deque to the specified newSize, inserting newSize ‐ size() copies of the specified value at the back if newSize > size(). If newSize < size(), the elements at the back are erased, value is ignored, and this method does not throw. If `newSize > size()` and an exception is thrown, *this` is unaffected. Throw `bsl::length_error if newSize > max_size().

Parameters

Name

Description

newSize

desired number of elements

value

value used when appending new elements

Created with MrDocs