BitArray new design
Era Scarecrow
rtcvb32 at yahoo.com
Wed Jan 9 13:47:54 PST 2013
On Wednesday, 9 January 2013 at 21:16:37 UTC, Era Scarecrow wrote:
> Hmm as I'm thinking about it more, a mixin for BitString may
> be better..
I'm having troubles trying to understand why this won't work.
Anyone clarify?
mixin template BitString()
{
struct BitString {
size_t opIndex(int i) {
//Error: this for bulkRaw needs to be type BitArray not type
BitString
return bulkRaw[i];
}
}
}
struct BitArray {
mixin BitString;
size_t[] bulkRaw;
BitString ba;
}
More information about the Digitalmars-d-learn
mailing list