mirror of
https://github.com/NixOS/nix.git
synced 2025-12-22 17:01:08 +01:00
libutil: Also fix AutoUnmount special member functions
This commit is contained in:
parent
54d2268d84
commit
198628790b
1 changed files with 16 additions and 1 deletions
|
|
@ -480,8 +480,23 @@ class AutoUnmount
|
||||||
Path path;
|
Path path;
|
||||||
bool del;
|
bool del;
|
||||||
public:
|
public:
|
||||||
AutoUnmount(Path &);
|
|
||||||
AutoUnmount();
|
AutoUnmount();
|
||||||
|
AutoUnmount(Path &);
|
||||||
|
AutoUnmount(const AutoUnmount &) = delete;
|
||||||
|
|
||||||
|
AutoUnmount(AutoUnmount && other) noexcept
|
||||||
|
: path(std::move(other.path))
|
||||||
|
, del(std::exchange(other.del, false))
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
AutoUnmount & operator=(AutoUnmount && other) noexcept
|
||||||
|
{
|
||||||
|
path = std::move(other.path);
|
||||||
|
del = std::exchange(other.del, false);
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
|
||||||
~AutoUnmount();
|
~AutoUnmount();
|
||||||
void cancel();
|
void cancel();
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue