Goto is fine in C code (in many cases the only sane way to do error
handling with proper cleanup), but in C++ we can indeed do better with RAII.
Using boost would be preferable to rolling our own RAII wrappers.