C++ function library