Background
I am cleaning up a legacy codebase by applying a coding guideline for the new
statement.
There is code like auto x = new(ClassName);
that I rewrite to auto x = new ClassName();
. It's quite obvious that this is not a placement new and I don't need to think about it.
However, there's also code like auto x = new(ClassName)(argument);
which looks much like a placement new. For now I blindly rewrote such code to auto x = new ClassName(argument);
as well.
Question
Might there be a case where a real placement new like auto x = new(placement-params)(Type);
is rewritten as auto x = new placement-params(Type);
and it still compiles but changes the meaning of the program?