Juha said:
The relevant difference being?
It looks like a constructor call,
No, you got it backwards. It doesn't look like a "constructor call". C++
language has no syntax for "constructor calls". The '()' part (possibly
with arguments) is called "initializer" in C++. And the process it
triggers is called "initialization". "Construction" (and constructor
calls) is just one very specific and very particular form of
"initialization", specific to class types only. "Initialization" in C++
is significantly wider concept than "construction".
it acts like a constructor call,
The semantics of initialization is described in C++ standard. And no, it
doesn't act as a constructor call.
and
it initializes the created object, as a constructor does.
Just because constructors initialize objects doesn't mean that every
initialization somehow involves constructor. Once again,
"initialization" in C++ is significantly wider concept than "construction".
For all
relevant purposes it is a constructor call.
No, it isn't. Otherwise, for example, one logical conclusion that would
follow from this would be to expect that the very same default
constructor should be called for automatic variables of type 'int'
declared without an initializer. As we all know, it is not the case.
You can ever give it a
parameter, like you can do to a constructor (like "new int(5)").
There are lots of things in C++ that can take a parameter. That doesn't
make them into "constructors" though.
What the machine code generated by the compiler ends up looking like
is completely irrelevant.
Machine code is not involved here in any way. What I'm saying is true on
the conceptual level of C++ language.