Const Ideas

Craig Black cblack at ara.com
Mon Dec 3 06:34:10 PST 2007


"Janice Caron" <caron800 at googlemail.com> wrote in message 
news:mailman.224.1196658519.2338.digitalmars-d at puremagic.com...
> On 12/3/07, Craig Black <craigblack2 at cox.net> wrote:
>> Sorry if this is a stupid question, but if
>>
>> const XY
>>
>> means that both X and Y are const, then
>
> But it doesn't. I don't understand what you're saying. A statement
> like "const XY x;" would mean that x is fully const and of type XY. A
> statement like "const X Y x;" just won't compile.

I guess using X and Y is bad since you assume they are both types..
Am I wrong in assuming the following?

const X* x;

is not equivalent to

const(X)* x;

Thus const X is not always equivalent to const(X)






More information about the Digitalmars-d mailing list