C const

Simen kjaeraas simen.kjaras at gmail.com
Sat Mar 5 02:40:30 PST 2011


Jesse Phillips <jessekphillips+D at gmail.com> wrote:

> simendsjo Wrote:
>
>> On 04.03.2011 23:10, Jesse Phillips wrote:
>> > Remember that const/immutable, and other attributes/properties aren't  
>> going to change the ABI so dropping them will be safer then leaving  
>> them.
>>
>> Thanks. Does this apply to all uses of const, or just complex members?
>
> Hopefully I'm not wrong on this, but you should even be able to change  
> the type as long as the size is the same. So instead of int you could  
> use uint or byte[8]... granted the library will still interpret it as  
> int. And of course that is assuming you are on a machine with a 32 bit  
> int.

And 4-bit bytes? :p

-- 
Simen


More information about the Digitalmars-d-learn mailing list