C++ single-application guard