1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-08-02 17:09:26 +02:00

ArrayOf<X> move constructor

This commit is contained in:
Paul Licameli 2016-04-02 14:17:20 -04:00
parent 8e447493eb
commit 61525264ae

View File

@ -367,6 +367,11 @@ public:
reinit(count, initialize);
}
ArrayOf(const ArrayOf&) = delete;
ArrayOf(ArrayOf&& that)
: std::unique_ptr < X[] >
(std::move((std::unique_ptr < X[] >&)(that)))
{
}
ArrayOf& operator= (ArrayOf &&that)
{
std::unique_ptr<X[]>::operator=(std::move(that));