a practice to C++ templates