mirror of
https://github.com/NixOS/nix.git
synced 2025-12-03 23:51:00 +01:00
AutoDelete: Add move constructor
This commit is contained in:
parent
890a4e980a
commit
34e92724d6
1 changed files with 9 additions and 1 deletions
|
|
@ -293,8 +293,16 @@ class AutoDelete
|
|||
bool recursive;
|
||||
public:
|
||||
AutoDelete();
|
||||
|
||||
AutoDelete(AutoDelete && x)
|
||||
{
|
||||
_path = std::move(x._path);
|
||||
del = x.del;
|
||||
recursive = x.recursive;
|
||||
x.del = false;
|
||||
}
|
||||
|
||||
AutoDelete(const std::filesystem::path & p, bool recursive = true);
|
||||
AutoDelete(AutoDelete &&) = delete;
|
||||
AutoDelete(const AutoDelete &) = delete;
|
||||
AutoDelete & operator=(AutoDelete &&) = delete;
|
||||
AutoDelete & operator=(const AutoDelete &) = delete;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue