mirror of
https://github.com/cookiengineer/audacity
synced 2025-05-07 15:22:34 +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:
|
private:
|
||||||
T *p{};
|
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:
|
private:
|
||||||
T *p{};
|
T *p{};
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user