C++ helpers