+1 vote

1 Answer

0 votes
by
Transitive const means that once const is applied to a type, it applies recursively to every sub-component of that type. Hence:

const(int*)** p;

p += 1;   // ok, p is mutable

*p += 1;  // ok, *p is mutable

**p += 1; // error, **p is const

***p += 1; // error, ***p is const

With transitivity, there is no way to have a const pointer to mutable int.

C++ const is not transitive.
...