> I don't see why
> 
> long x[1024];
> 
> Q *q = new (x) Q;
> q->~Q ();
> new (x) T;
> 
> would be invalid.  I also don't see why
> 
> Q q;
> q.~Q ();
> new (&q) T;
> 
> would be.  Object lifetime is precisely specified and I don't see where it is
> tied to (static) storage lifetime.

This is precisely the testcase I posted on beggining of this thread.

I do not see how the testcases can work with aliasing rules in the case Q's and 
T's
memory is known to not alias.

Either we need to define what is and is not supported or go for speculative 
devirt more often.

Honza

Reply via email to