Hello JPF,

Thanks for your help, I think I now understand what's going on.
'this' is a mutable local reference in the constructor but the
constructor automatically returns the local 'this'. This explains why
the first case works while the second doesn't. This would also mean I
could do "this = this(ptr);" in the second constructor and it indeed
does work; With the above change the whole testcase works as expected.

Odd....

I now just have to decide whether I'll use the "implementation specific
but nice syntax" way or a static function instead of public
constructors.

don't use implementation specific code. I suggest you file a bug/clarification request. If that is the way things are supposed to work, it should be officially sanctioned. If not, it should be removed.

--
<IXOYE><


Reply via email to