[container.node.observers]

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

## 23.2 Requirements [[container.requirements]](container.requirements#container.node.observers)

### 23.2.5 Node handles [[container.node]](container.node#observers)

#### 23.2.5.4 Observers [container.node.observers]

[ð](#itemdecl:1)

`constexpr value_type& value() const;
`

[1](#1)

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

*Preconditions*: empty() == false[.](#1.sentence-1)

[2](#2)

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

*Returns*: A reference to the value_type subobject in thecontainer_node_type object pointed to by ptr_[.](#2.sentence-1)

[3](#3)

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

*Throws*: Nothing[.](#3.sentence-1)

[ð](#itemdecl:2)

`key_type& key() const;
`

[4](#4)

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

*Preconditions*: empty() == false[.](#4.sentence-1)

[5](#5)

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

*Returns*: A non-const reference to the key_type member of thevalue_type subobject in the container_node_type object
pointed to by ptr_[.](#5.sentence-1)

[6](#6)

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

*Throws*: Nothing[.](#6.sentence-1)

[7](#7)

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

*Remarks*: Modifying the key through the returned reference is permitted[.](#7.sentence-1)

[ð](#itemdecl:3)

`constexpr mapped_type& mapped() const;
`

[8](#8)

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

*Preconditions*: empty() == false[.](#8.sentence-1)

[9](#9)

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

*Returns*: A reference to the mapped_type member of thevalue_type subobject in the container_node_type object
pointed to by ptr_[.](#9.sentence-1)

[10](#10)

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

*Throws*: Nothing[.](#10.sentence-1)

[ð](#itemdecl:4)

`constexpr allocator_type get_allocator() const;
`

[11](#11)

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

*Preconditions*: empty() == false[.](#11.sentence-1)

[12](#12)

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

*Returns*: *alloc_[.](#12.sentence-1)

[13](#13)

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

*Throws*: Nothing[.](#13.sentence-1)

[ð](#itemdecl:5)

`constexpr explicit operator bool() const noexcept;
`

[14](#14)

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

*Returns*: ptr_ != nullptr[.](#14.sentence-1)

[ð](#itemdecl:6)

`constexpr bool empty() const noexcept;
`

[15](#15)

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

*Returns*: ptr_ == nullptr[.](#15.sentence-1)
