Cast to left hand side
ketmar via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Sun Nov 9 21:41:20 PST 2014
On Sun, 09 Nov 2014 22:17:33 +0000
bearophile via Digitalmars-d-learn <digitalmars-d-learn at puremagic.com>
wrote:
> eles:
>
> > I am also strongly in favor of introducing an "uncast". For
> > example, in C++'x const_cast and in D's cast for removing, for
> > example immutability:
> >
> > immutable int* p = ...;
> > int* q = cast(int*)p;
>
> I think this is supposed to work:
>
> void main() {
> immutable int* p;
> int* q = cast()p;
> }
it works for simple types, like 'immutable int a'. but for
'immutable(int*) a' it returns 'immutable(int)* a'.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://lists.puremagic.com/pipermail/digitalmars-d-learn/attachments/20141110/2a6fa8a7/attachment.sig>
More information about the Digitalmars-d-learn
mailing list