Proposal to add 'Elements of Programming' Concepts to std.traits

Philippe Sigaud philippe.sigaud at gmail.com
Sun Jun 17 00:04:16 PDT 2012


On Sun, Jun 17, 2012 at 8:42 AM, Jonathan M Davis <jmdavisProg at gmx.com> wrote:

> It wouldn't be. No public function was called. All you did was access the
> public member variable. Having public members and invariants at the same time
> doesn't work very well.

If I change

int value;

to

private int value;

it can still be accessed through alias this (I guess) and no invariant
is called.


More information about the Digitalmars-d mailing list