Access the function return value in C++ scope guard
blog.the-pans.com