Logical const

Walter Bright newshound2 at digitalmars.com
Sun Nov 28 20:31:24 PST 2010


Rainer Deyke wrote:
> In C++, const is transitive for direct members.  It is only intransitive
> for pointer/references, and even these can be made transitive through
> the use of a transitive-const smart pointer class.

You'd have to do *all* of your pointer/ref members that way, with no compilation 
errors if you miss any spots. Once again, it's a convention, not a guarantee.


More information about the Digitalmars-d mailing list