Cpp: generate params as "const type&"