News for hackers. Stuff that matters.
Re:Rule of Zero (C++) by mpyne on Friday November 23, 2012 @10:52AM (#4822576)
This "Rule of Zero" construct doesn't forgo RAII, since RAII does not simply mean "write constructors and destructors".

Instead it allows the compiler and language to automatically do the right thing to enable RAII by using appropriate library-provided building blocks. E.g. his std::unique_ptr + custom deleter type enables the compiler to automatically make a RAII-compliant class for the author, so it's still RAII, just automatically implemented (except for the ctor, in this case).

There are no comments on this comment yet.