D
DaKoadMunky
Is it fair to say that in the statement
T* t = new T;
that construction of T is a side-effect and that it need occur only before the
next sequence point?
If that is the case, what about something like this...
T *t;
(t=new T)->SomeFunc();
It is my understanding that there is a sequence point prior to entering a
function and that all arguments to a function and its side-effects will have
been evaluated prior to entering a function. Does that include the implict
argument representing the "this" object?
It is my understanding that the new operator consists of memory allocation
using an appropriate operator new and memory initialization using an
appropriate constructor.
It is also my understanding that in the above statement that assignment to T* t
could occur either before or after the constructor for T executes.
T* t = new T;
that construction of T is a side-effect and that it need occur only before the
next sequence point?
If that is the case, what about something like this...
T *t;
(t=new T)->SomeFunc();
It is my understanding that there is a sequence point prior to entering a
function and that all arguments to a function and its side-effects will have
been evaluated prior to entering a function. Does that include the implict
argument representing the "this" object?
It is my understanding that the new operator consists of memory allocation
using an appropriate operator new and memory initialization using an
appropriate constructor.
It is also my understanding that in the above statement that assignment to T* t
could occur either before or after the constructor for T executes.