a practice to C++ template