mirror of
https://github.com/cookiengineer/audacity
synced 2025-05-05 22:28:57 +02:00
Define swap for std::unique_ptr
This commit is contained in:
parent
586074bab8
commit
9cc4eaadf8
@ -185,6 +185,12 @@ namespace std {
|
||||
}
|
||||
}
|
||||
|
||||
void swap(unique_ptr& that)
|
||||
{
|
||||
std::swap(p, that.p);
|
||||
std::swap(get_deleter(), that.get_deleter());
|
||||
}
|
||||
|
||||
private:
|
||||
T *p{};
|
||||
};
|
||||
@ -261,6 +267,12 @@ namespace std {
|
||||
}
|
||||
}
|
||||
|
||||
void swap(unique_ptr& that)
|
||||
{
|
||||
std::swap(p, that.p);
|
||||
std::swap(get_deleter(), that.get_deleter());
|
||||
}
|
||||
|
||||
private:
|
||||
T *p{};
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user