string types: const(char)[] and cstring

Walter Bright newshound1 at digitalmars.com
Sat May 26 23:30:17 PDT 2007


Chris Nicholson-Sauls wrote:
> That's an interesting syntax, casting to a trait/attribute with the rest 
> of the type inferred.  I presume cast(const) works as well.  (Maybe 
> cast(scope)?  Then again, what's the use...)  Given cast(*) where * is 
> invariant/const, is cast(*)T[] the same as cast(*(T)[]) or 
> cast(*(T[]))?  That is, does the trait apply to the element type, or the 
> array?

Both.



More information about the Digitalmars-d-announce mailing list