Various useful C++ functions and classes.