1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-12-23 09:21:09 +01:00

treewide: Follow rule of five

Good to explicitly declare things to not accidentally do twice the work by
preventing that kind of misuse.
This is essentially just cppcoreguidelines-special-member-functions lint
in clang-tidy.
This commit is contained in:
Sergei Zimmerman 2025-12-15 01:03:25 +03:00
parent 8c74aadbf7
commit 54d2268d84
No known key found for this signature in database
10 changed files with 68 additions and 14 deletions

View file

@ -741,6 +741,11 @@ public:
inDebugger = true;
}
DebuggerGuard(DebuggerGuard &&) = delete;
DebuggerGuard(const DebuggerGuard &) = delete;
DebuggerGuard & operator=(DebuggerGuard &&) = delete;
DebuggerGuard & operator=(const DebuggerGuard &) = delete;
~DebuggerGuard()
{
inDebugger = false;