<forward_list> functions
Visual Studio 2015
The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.
The latest version of this topic can be found at <forward_list> functions.
swap](#swap)|
Exchanges the elements of two forward lists.
void swap(
forward_list <Type, Allocator>& left,
forward_list <Type, Allocator>& right);
Parameters
| Parameter | Description |
|---|---|
left | An object of type forward_list. |
right | An object of type forward_list. |
Remarks
This template function executes left.swap(right).
Show: