[expected.un.obs]

# 22 General utilities library [[utilities]](./#utilities)

## 22.8 Expected objects [[expected]](expected#un.obs)

### 22.8.3 Class template unexpected [[expected.unexpected]](expected.unexpected#expected.un.obs)

#### 22.8.3.3 Observers [expected.un.obs]

[ð](#lib:error,unexpected)

`constexpr const E& error() const & noexcept;
constexpr E& error() & noexcept;
`

[1](#1)

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

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

[ð](#lib:error,unexpected_)

`constexpr E&& error() && noexcept;
constexpr const E&& error() const && noexcept;
`

[2](#2)

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

*Returns*: std​::​move(*unex*)[.](#2.sentence-1)
