C++ template class utilities.