std::vector::reserve
来自cppreference.com
|
|
This page has been machine-translated from the English version of the wiki using Google Translate.
The translation may contain errors and awkward wording. Hover over text to see the original version. You can help to fix errors and improve the translation. For instructions click here. |
| void reserve( size_type size ); |
||
设置容量至少
size容器。如果需要分配新的存储. Original:
Sets the capacity of the container to at least
size. New storage is allocated if necessary. The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
目录 |
[编辑] 参数
| size | - | 新产能的容器
Original: new capacity of the container The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
[编辑] 返回值
(无)
Original:
(none)
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
[编辑] 例外
std::length_error if size > max_size().
[编辑] 复杂性
线性大小的容器
Original:
linear in the size of the container
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
[编辑] 另请参阅
| 返回的元素的数目,可以保持在当前分配的存储空间 Original: returns the number of elements that can be held in currently allocated storage The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (公共成员函数) | |