Re: Best practices of using const

2019-02-14 Thread envoid via Digitalmars-d-learn
Thank you for such a comprehensive answer.

Best practices of using const

2019-02-13 Thread envoid via Digitalmars-d-learn
In C++ we have const correctness in some way. A compiler can make optimizations whenever it doesn't find a const_cast and the mutable specifier marks members that aren't a part of the object state. Of course, it's not perfect but one can document their intentions and it's possible to use