Why can't we define re-assignable const reference variable?

none z at gg.com
Sat Feb 16 15:44:30 PST 2008


Sorry in C++, it should be

> What I mean is in C++, you can define 2 different kinds of C++ pointers:
> const C* b;  // b cannot be re-bind, and the object cannot be modified
C* const b;

> C* const b;  // b can    be re-bind, but the object cannot be modified
const C* b;

and:
const  C* const b;  // both pointer, and data are const.



More information about the Digitalmars-d mailing list