Boost logo

Ublas :

From: Neal Becker (ndbecker2_at_[hidden])
Date: 2005-08-18 11:53:28


Michael Stevens wrote:

> On Wednesday 17 August 2005 23:41, Neal Becker wrote:
>> Here is a revised patch. I think I prefer this method to control
>> initialization (pass an argument to vector constructor)
>
> In your patch you have
>
> ~unbounded_array () {
> if (size_) {
> - std::_Destroy (begin(), end(), alloc_);
> - alloc_.deallocate (data_, size_);
> + const iterator i_end = end();
> + for (iterator i = begin (); i != i_end; ++i) {
> + iterator_destroy (i);
> + }
> + alloc_.deallocate (data_, size_);
> }
> }
>
> Any ideas where _Destroy comes from and what it does. I assume it is not
> part of the STL.

I copied this from gnu libstdc++ vector. It is found in stl_construct.h.

Maybe we can find a standard function to use instead?