Const Ideas
Janice Caron
caron800 at googlemail.com
Mon Dec 3 06:54:24 PST 2007
On Dec 3, 2007 2:34 PM, Craig Black <cblack at ara.com> wrote:
> 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)
OK. Start again, You've misunderstood me. My X stands for /everything
between the word const and the identifier being declared/. (Not
literally the symbol "X").
So I would want "const X* x" to be interchangeable with "const(X*) x",
since, in this case, /everything between the word const and the
identifier being declared/ is "X*".
More information about the Digitalmars-d
mailing list