Constancy of invariants
Stewart Gordon
smjg_1998 at yahoo.com
Sun Jan 29 09:27:20 PST 2012
On 29/01/2012 16:46, Daniel Murphy wrote:
<snip>
>> And what's your view? Should we make invariants automatically const?
> Yes, probably. Once downside is that any private methods you want to call
> will need to be const-correct.
<snip>
But if you want your class to be const-usable at all, the invariant needs to be const
regardless whether we make it automatic or not.
Stewart.
More information about the Digitalmars-d
mailing list