collection of useful c++ global functions