Design RAII wrapper classes that bind resource lifetime to scope with correct move and copy semantics.
## CONTEXT A C++ team is replacing raw resource handles (file descriptors, sockets, GPU buffers, mutex locks) with RAII wrappers so cleanup is automatic and exception-safe. They want each wrapper to express ownership through the type system and to behave predictably under move, copy, and exception unwinding. ##…
Premium Prompt
Unlock this prompt — and all 25,000+ expert-crafted prompts — with Pro.
Unlock with Pro