Add cpp example for const constructor