this(this) must be cheap and O(1)

deadalnix deadalnix at gmail.com
Sun Sep 25 11:37:57 PDT 2011


Le 25/09/2011 04:52, Andrei Alexandrescu a écrit :
> On 9/24/11 9:31 PM, Michel Fortin wrote:
>> Perhaps I am missing the point. What would be gained by forcing
>> this(this) to be nothrow?
>
> It further frees the standard library to cater for the throwing case.
>
> Andrei

If I understand, what is explained in this thread is things that the 
standard lib can assume concerning this(this) ?

So, in the end, I'm not disallowed to have an expensive this(this), but 
I should expect that the standard lib will not behave optimally in this 
case ?

Or are we talking about some modification/restriction in the language ?


More information about the Digitalmars-d mailing list