Header Reference: <forward_list>
Header Reference: <forward_list>
Singly-linked list container facilities from <forward_list>.
Header Reference: <forward_list>
Singly-linked list container facilities from <forward_list>.
Use reference pages to confirm names, categories, nearby facilities, and the constraints that matter before writing or reviewing code.
Header reference pages are meant to answer a practical question quickly: what this header provides, when to reach for it, and which usage rules are easiest to get wrong.
<forward_list>std::forward_list<T>Use <forward_list> when a singly-linked structure is specifically required and minimal per-node overhead matters.
list and rarely the default choice.#include <forward-list>
int main() {
// Start with the primary facility from <forward-list>.
// Then verify lifetime, invalidation, ordering, or error-handling rules.
return 0;
}