Namespace:

Code: http://dpaste.dzfl.pl/6ae9f91a

I think you can't use alloca() lie this, buf vanishes when the
constructor ends:

        this(const size_t len)(ref T[len] arr) {
                this._buf = cast(T*) alloca(len * T.sizeof);
                
                for (size_t i = 0; i < len; ++i) {
                        this._buf[i] = arr[i];
                }
                
                this._length = len;
        }

Bye,
bearophile

Reply via email to