Boost logo

Ublas :

From: Neal Becker (ndbecker2_at_[hidden])
Date: 2005-08-17 06:28:33


Please consider this patch. This is based on stl vector.
diff -u /usr/include/boost/numeric/ublas/storage.hpp{.orig,}
--- /usr/include/boost/numeric/ublas/storage.hpp.orig 2005-08-17
07:16:57.000000000 -0400
+++ /usr/include/boost/numeric/ublas/storage.hpp 2005-08-17
07:19:10.000000000 -0400
@@ -96,13 +96,14 @@
         }
         BOOST_UBLAS_INLINE
         ~unbounded_array () {
- if (size_) {
- const iterator i_end = end();
- for (iterator i = begin (); i != i_end; ++i) {
- iterator_destroy (i);
- }
- alloc_.deallocate (data_, size_);
- }
+ std::_Destroy (begin(), end(), alloc_);
+// if (size_) {
+// const iterator i_end = end();
+// for (iterator i = begin (); i != i_end; ++i) {
+// iterator_destroy (i);
+// }
+// alloc_.deallocate (data_, size_);
+// }
         }
 
         // Resizing