Fix peg/leg for cpp: remove errors & warnings in header
Fix peg/leg for cpp: remove errors & warnings
Port some macros, cosmetic changes
Boing by value