refreshing memory on C++ templates