Use full types in C++ output declarations.

Also added for this: setting return types of instantiations.