How to break const

Iain Buclaw ibuclaw at ubuntu.com
Tue Jun 19 04:22:09 PDT 2012


On 19 June 2012 12:03, deadalnix <deadalnix at gmail.com> wrote:
> Le 19/06/2012 12:49, Iain Buclaw a écrit :
>
>> So we have a few combinations then:
>>
>> pure  - as in weakly pure, guarantees not to change global state, but
>> may alter it's own hidden state.
>>
>> pure nothrow - as in strongly pure, where is guaranteed not to have
>> any side effects, so is suitable for constant folding / the usual
>> optimisations for a function typically marked as __pure__ in C.
>>
>> pure const - similar to strongly pure, as is guaranteed not to be able
>> to alter its own state (as it's const), but still may have side
>> effects / throw an exception.
>>
>>
>> Make much sense? :-)
>>
>
> You know that it doesn't make any sense, right ?

ramble, ramble, ramble, ramble. :o)

-- 
Iain Buclaw

*(p < e ? p++ : p) = (c & 0x0f) + '0';


More information about the Digitalmars-d mailing list