Collection of useful lightweight C++ functions