mirror of
https://github.com/NixOS/nix.git
synced 2025-12-04 16:10:59 +01:00
Merge pull request #14682 from NixOS/autodelete-move
AutoDelete: Add move constructor
This commit is contained in:
commit
18e31d404b
1 changed files with 9 additions and 1 deletions
|
|
@ -293,8 +293,16 @@ class AutoDelete
|
||||||
bool recursive;
|
bool recursive;
|
||||||
public:
|
public:
|
||||||
AutoDelete();
|
AutoDelete();
|
||||||
|
|
||||||
|
AutoDelete(AutoDelete && x) noexcept
|
||||||
|
{
|
||||||
|
_path = std::move(x._path);
|
||||||
|
del = x.del;
|
||||||
|
recursive = x.recursive;
|
||||||
|
x.del = false;
|
||||||
|
}
|
||||||
|
|
||||||
AutoDelete(const std::filesystem::path & p, bool recursive = true);
|
AutoDelete(const std::filesystem::path & p, bool recursive = true);
|
||||||
AutoDelete(AutoDelete &&) = delete;
|
|
||||||
AutoDelete(const AutoDelete &) = delete;
|
AutoDelete(const AutoDelete &) = delete;
|
||||||
AutoDelete & operator=(AutoDelete &&) = delete;
|
AutoDelete & operator=(AutoDelete &&) = delete;
|
||||||
AutoDelete & operator=(const AutoDelete &) = delete;
|
AutoDelete & operator=(const AutoDelete &) = delete;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue