mirror of
https://github.com/ToruNiina/toml11.git
synced 2025-12-16 03:08:52 +08:00
docs: add ordered_map::erase to doc
This commit is contained in:
@@ -281,6 +281,17 @@ Finds an element with the specified key and returns a reference to its value.
|
|||||||
If the key is not found, a new value is constructed and returned.
|
If the key is not found, a new value is constructed and returned.
|
||||||
If the `ordered_map` is `const`, throws `std::out_of_range` instead.
|
If the `ordered_map` is `const`, throws `std::out_of_range` instead.
|
||||||
|
|
||||||
|
### `erase(...)`
|
||||||
|
|
||||||
|
```cpp
|
||||||
|
iterator erase(iterator pos);
|
||||||
|
iterator erase(const_iterator pos);
|
||||||
|
iterator erase(const_iterator first, const_iterator last);
|
||||||
|
size_type erase(const key_type& key);
|
||||||
|
```
|
||||||
|
|
||||||
|
Removes values pointed by an iterator or a value corresponding to a key.
|
||||||
|
|
||||||
### `key_comp()`
|
### `key_comp()`
|
||||||
|
|
||||||
```cpp
|
```cpp
|
||||||
|
|||||||
@@ -290,6 +290,17 @@ mapped_type const& operator[](const key_type& k) const;
|
|||||||
|
|
||||||
`ordered_map` が `const` の場合は新規な値を構築できないので、 `std::out_of_range` を送出します。
|
`ordered_map` が `const` の場合は新規な値を構築できないので、 `std::out_of_range` を送出します。
|
||||||
|
|
||||||
|
### `erase(...)`
|
||||||
|
|
||||||
|
```cpp
|
||||||
|
iterator erase(iterator pos);
|
||||||
|
iterator erase(const_iterator pos);
|
||||||
|
iterator erase(const_iterator first, const_iterator last);
|
||||||
|
size_type erase(const key_type& key);
|
||||||
|
```
|
||||||
|
|
||||||
|
イテレータの指す位置の値、あるいはキーに該当する値を削除します。
|
||||||
|
|
||||||
### `key_comp()`
|
### `key_comp()`
|
||||||
|
|
||||||
```cpp
|
```cpp
|
||||||
|
|||||||
Reference in New Issue
Block a user