On Fri, 13 Feb 2009 17:24:54 +0300, Andrei Alexandrescu <[email protected]> wrote:

Rainer Deyke wrote:
Andrei Alexandrescu wrote:
C++ ctors won't do the right thing if you use pointers, which is the
moral equivalent of using T[] inside MathematicalVector. If you refer to std::vector instead, then that's a carefully-defined type that does have
the right copy constructor defined.
 So where's the D equivalent of std::vector?  Phobos has nothing.

It will.

I was under the impression that native arrays were intended to be used
directly in D, something I rarely do in C++.  Certainly neither of the
standard libraries has any hesitation about passing unadorned dynamic
arrays around.

Phobos2 plans to consistently consider T[] a range, not a full-fledged array. A range corresponds to a pair of iterators in STL.


Andrei

Will T[] get front, back, empty properties, and popFront(), popBack() methods?
Perhaps, its the time T[] internal structure is changed!
For example, ptr+size replaced by two pointers, some additional fields added etc..

Reply via email to