次の方法で共有


<forward_list> functions

 

The latest version of this topic can be found at <forward_list> functions.

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).

See Also

<forward_list>