Walter Bright wrote:
Don wrote:
If you provide slice access (eg, give me elements [a..b] as an array of ints) then you can have reasonable performance. Unpacking consecutive elements can be done quite efficiently (it's an interesting optimisation problem, though!).

It wouldn't be slicable because a slice would have to start at the beginning of a byte. The D bit type died in that quagmire.
And std::vector<bool>.
I didn't mean an actual D slice -- I meant value semantics, not reference semantics. Give me a copy of X[a..b], putting it into an int[] array.
Something like:

struct ArbitrarySizedIntArray
{
int[] extractSlice(size_t a, size_t b, int [] dest=null)
{
}

}

Reply via email to