Add C and C++ templates