intrusive_list: Specify noexcept on swap implementations

Necessary to fully satisfy the Swappable concept.
This commit is contained in:
Lioncash 2016-09-06 22:47:52 -04:00
parent 5bc9ce544f
commit 8fb857f9da

View file

@ -355,7 +355,7 @@ public:
* Exchanges contents of this list with another list instance.
* @param other The other list to swap with.
*/
void swap(IntrusiveList& other) {
void swap(IntrusiveList& other) noexcept {
root.swap(other.root);
}
@ -370,7 +370,7 @@ private:
* @param rhs The second list.
*/
template <typename T>
void swap(IntrusiveList<T>& lhs, IntrusiveList<T>& rhs) {
void swap(IntrusiveList<T>& lhs, IntrusiveList<T>& rhs) noexcept {
lhs.swap(rhs);
}