c++ output: reorder definitions before value type uses