On 11/8/2011 3:57 PM, Martin Nowak wrote:
Yeah, the two common C++ solutions are either overload macros or non-transitive
const.
Remarkably enough it's hardly understood in a C++ context that transitive
qualifiers offer much stronger guarantees.
Take shared_ptr as a prominent example for the disaster.

_Tp*
get() const // never throws
{ return _M_ptr; }

With the even worse C++ solution to this being const_iterator.

Many top shelf C++ programmers do understand these issues. They've complained to me about the unattractiveness of the various C++ solutions to the inout problem.

D's solution seems obvious only in retrospect.

Reply via email to