defer action to end of scope (C++11 only / header-only)