[unord.req.except]

# 23 Containers library [[containers]](./#containers)

## 23.2 Requirements [[container.requirements]](container.requirements#unord.req.except)

### 23.2.8 Unordered associative containers [[unord.req]](unord.req#except)

#### 23.2.8.2 Exception safety guarantees [unord.req.except]

[1](#1)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/containers.tex#L6009)

For unordered associative containers, no clear() function
throws an exception[.](#1.sentence-1)

erase(k) does not throw an
exception unless that exception is thrown by the container's Hash orPred object (if any)[.](#1.sentence-2)

[2](#2)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/containers.tex#L6017)

For unordered associative containers, if an exception is thrown by any
operation other than the container's hash function from within aninsert or emplace function inserting a single element,
the insertion has no effect[.](#2.sentence-1)

[3](#3)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/containers.tex#L6023)

For unordered associative containers, no swap function throws
an exception unless that exception is thrown by the swap of the container'sHash or Pred object (if any)[.](#3.sentence-1)

[4](#4)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/containers.tex#L6028)

For unordered associative containers, if an exception is thrown
from within a rehash() function other than by the container's hash
function or comparison function, the rehash() function has no effect[.](#4.sentence-1)
