generated cpp code compiles