[coroutine.handle.con]

# 17 Language support library [[support]](./#support)

## 17.13 Coroutines [[support.coroutine]](support.coroutine#coroutine.handle.con)

### 17.13.4 Class template coroutine_handle [[coroutine.handle]](coroutine.handle#con)

#### 17.13.4.2 Construct/reset [coroutine.handle.con]

[ð](#lib:coroutine_handle,constructor)

`constexpr coroutine_handle() noexcept;
constexpr coroutine_handle(nullptr_t) noexcept;
`

[1](#1)

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

*Postconditions*: address() == nullptr[.](#1.sentence-1)

[ð](#lib:from_promise,coroutine_handle)

`static coroutine_handle from_promise(Promise& p);
`

[2](#2)

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

*Preconditions*: p is a reference to a promise object of a coroutine[.](#2.sentence-1)

[3](#3)

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

*Postconditions*: addressof(h.promise()) == addressof(p)[.](#3.sentence-1)

[4](#4)

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

*Returns*: A coroutine handle h referring to the coroutine[.](#4.sentence-1)

[ð](#lib:operator=,coroutine_handle)

`coroutine_handle& operator=(nullptr_t) noexcept;
`

[5](#5)

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

*Postconditions*: address() == nullptr[.](#5.sentence-1)

[6](#6)

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

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