resource: swap
This commit is contained in:
@@ -116,6 +116,15 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Exchanges the content with that of a given resource.
|
||||
* @param other Resource to exchange the content with.
|
||||
*/
|
||||
void swap(resource &other) {
|
||||
using std::swap;
|
||||
swap(value, other.value);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Returns a reference to the managed resource.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user