Is there a difference between two object initializations.
Object obj(constructor_arguments);
or
Object obj = Object(constructor_arguments);
Note that the second initialization is not intended for a pointer with the new operator. It is designed for a variable without heap.
GCC compiles and works fine, and I wonder if there is any difference or whether both expressions are semantically the same.
kris source share