Miscellaneous C++ utilities