+1 vote
in D Programming by
How Does Const Differ In C++?

1 Answer

0 votes
by

C++ has a const system that is closer to D's than any other language, but it still has huge differences:

  • const is not transitive
  • no immutables
  • const objects can have mutable members
  • const can be legally cast away and the data modified
  • const T and T are not always distinct types
...