On Thu, Mar 31, 2016 at 12:57:50PM -0700, Walter Bright via Digitalmars-d wrote: > On 3/31/2016 12:44 PM, H. S. Teoh via Digitalmars-d wrote: > >Ah, makes sense. But what would aa[x] return? > > A bool indicating membership. > > >And how would you add elements to it? > > aa[x] = true; // add member x > aa[x] = false; // remove member x > x in aa; // compile error
How is this different from bool[T] then? Just the fact that you can't get a reference to the bool? T -- Don't throw out the baby with the bathwater. Use your hands...
