ScopeGuards as imagined here (Facebook's folly library has one) are near-essential for writing reasonable systems code in C++.
int fd = socket(...);
if (fd < 0) return false;
SCOPE_EXIT { ::close(fd); };
if (ioctl(fd, ...) != 0) return false;
if (ioctl(fd, ...) != 0) return false;
...
return true;
You could totally just write the FdWrapper class, but then you're still a user handling resource cleanup, but with more lines.