Translating C const

Jacob Carlborg doob at me.com
Tue May 15 12:36:09 PDT 2012


I'm trying to figuring out how to translate const in C to D. I have 
these examples:

const int * a;
int * const b;
const int * const c;
const int * const * d;

Which I think should be translated like this:

const(int)* a;
const int* c;
const(int*)* d;

But I don't know how to translate "b". I think "b" is a const pointer to 
a mutable int, is that possible to have in D?

-- 
/Jacob Carlborg


More information about the Digitalmars-d-learn mailing list