added c++ templates for SingleCompile