Ruling out arbitrary cost copy construction?
Rainer Deyke
rainerd at eldwood.com
Sun Oct 31 10:19:12 PDT 2010
On 10/31/2010 10:42, Andrei Alexandrescu wrote:
> There are several solutions possible, some that require the compiler
> knowing about the idiom, and some relying on trusted code. One in the
> latter category is to create immutable objects with an unattainable
> reference count (e.g. size_t.max) and then incrementing the reference
> count only if it's not equal to that value. That adds one more test for
> code that copies const object, but I think it's acceptable.
This means that immutable objects do not have deterministic destructors.
I don't think this is acceptable.
--
Rainer Deyke - rainerd at eldwood.com
More information about the Digitalmars-d
mailing list