automatic conversion to invariant (string?)

Koroskin Denis 2korden+dmd at gmail.com
Thu Mar 20 04:09:51 PDT 2008


On Thu, 20 Mar 2008 13:23:16 +0300, Yossarian <xtauer01 at stud.fit.vutbr.cz>  
wrote:

> Hello,
> in D2, when you use types as string, wstring (which are  
> invariant(char)[]),
> there is no autocast from char[] to invariant(char)[] (or  
> const(char)[]), wouldn't
> this 'downcast' be logical?'
>
> -- Yossarian
> Tato zpráva byla vytvořena převratným poštovním klientem Opery:  
> http://www.opera.com/mail/


There is a difference between const and invariant. Const means that "you  
shouldn't try to change it" whereas invariant means "this won't change  
ever". At least, that's how I understand this.



More information about the Digitalmars-d mailing list