cast(!const) proposal

Janice Caron caron800 at googlemail.com
Tue Sep 11 09:59:56 PDT 2007


While I think of it, casting from const pointer to int should also be
illegal without that same special syntax.

For example

const int n = 42;
auto p = &n;
auto k = cast(int)p; /* should be a compile error */

Do we have intptr_t in D?

Anyway, losing the constness by casting to int is cheating, so that
too should require the special syntax.



More information about the Digitalmars-d mailing list