共用方式為


<list> 函式

swap

交換兩個清單的項目。

template <class T, class Allocator>
    void swap(list<T, Allocator>& left, list<T, Allocator>& right)

參數

left
list 類型的物件。

right
list 類型的物件。

備註

此範本函式會執行 left.swap(right)