improved code quality for C++ static constructor calls