capture by = and stop object value modification

0
CPP
cpp
OUTPUT