[forward.list.syn]

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

## 23.3 Sequence containers [[sequences]](sequences#forward.list.syn)

### 23.3.6 Header <forward_list> synopsis [forward.list.syn]

[ð](#header:%3cforward_list%3e)

#include <compare> // see [[compare.syn]](compare.syn "17.12.1 Header <compare> synopsis")#include <initializer_list> // see [[initializer.list.syn]](initializer.list.syn "17.11.2 Header <initializer_­list> synopsis")namespace std {// [[forward.list]](forward.list "23.3.7 Class template forward_­list"), class template forward_listtemplate<class T, class Allocator = allocator<T>> class forward_list; template<class T, class Allocator>constexpr bool operator==(const forward_list<T, Allocator>& x, const forward_list<T, Allocator>& y); template<class T, class Allocator>constexpr *synth-three-way-result*<T> operator<=>(const forward_list<T, Allocator>& x, const forward_list<T, Allocator>& y); template<class T, class Allocator>constexpr void swap(forward_list<T, Allocator>& x, forward_list<T, Allocator>& y)noexcept(noexcept(x.swap(y))); // [[forward.list.erasure]](forward.list.erasure "23.3.7.7 Erasure"), erasuretemplate<class T, class Allocator, class U = T>constexpr typename forward_list<T, Allocator>::size_type
 erase(forward_list<T, Allocator>& c, const U& value); template<class T, class Allocator, class Predicate>constexpr typename forward_list<T, Allocator>::size_type
 erase_if(forward_list<T, Allocator>& c, Predicate pred); namespace pmr {template<class T>using forward_list = std::forward_list<T, polymorphic_allocator<T>>; }}
