Small troubles with "private"

Chris Cain clcain at uncg.edu
Wed Nov 6 17:14:34 PST 2013


On Wednesday, 6 November 2013 at 12:19:26 UTC, Timon Gehr wrote:
> How about just adding full granularity?
>
> By condition:
>
> @visibleIf!true                         // public
> @visibleIf!(isSubtypeOf!(typeof(this))) // protected
>
> By explicit enumeration:
>
> @visible!(getModule!(typeof(this))) // private
> @visible!(typeof(this), T) // visible to type 'T'
> @visible!(typeof(this)) // 'super private'
> @visible!foo // only (member) function 'foo' can access it
> @visible!() // nobody can access it

Dear Santa,
...


More information about the Digitalmars-d-learn mailing list