template example based on c++