if(a) { CMy one; } if(b) { CMy one; }
Move the first one to outer scope, error: "multiple definitions". Should use the outer scope's definition in the second case too.