alloc_(a), size_ (size) {
if (size_) {
data_ = alloc_.allocate (size_);
+//Disabled warning C4127 because the conditional expression is constant
+#ifdef _MSC_VER
+#pragma warning(push)
+#pragma warning(disable: 4127)
+#endif
if (! detail::has_trivial_constructor<T>::value) {
+#ifdef _MSC_VER
+#pragma warning(pop)
+#endif
for (pointer d = data_; d != data_ + size_; ++d)
alloc_.construct(d, value_type());
}
else
data_ = 0;
}
+#ifdef BOOST_UBLAS_CPP_GE_2011
+ BOOST_UBLAS_INLINE
+ unbounded_array (unbounded_array &&c) :
+ storage_array<unbounded_array<T, ALLOC> >(),
+ alloc_ (std::move(c.alloc_)), size_ (c.size_), data_(c.data_)
+ {
+ c.size_ = 0;
+ c.data_ = nullptr;
+ }
+#endif
BOOST_UBLAS_INLINE
~unbounded_array () {
if (size_) {
+//Disabled warning C4127 because the conditional expression is constant
+#ifdef _MSC_VER
+#pragma warning(push)
+#pragma warning(disable: 4127)
+#endif
if (! detail::has_trivial_destructor<T>::value) {
+#ifdef _MSC_VER
+#pragma warning(pop)
+#endif
// std::_Destroy (begin(), end(), alloc_);
const iterator i_end = end();
for (iterator i = begin (); i != i_end; ++i) {
}
}
else {
+//Disabled warning C4127 because the conditional expression is constant
+#ifdef _MSC_VER
+#pragma warning(push)
+#pragma warning(disable: 4127)
+#endif
if (! detail::has_trivial_constructor<T>::value) {
+#ifdef _MSC_VER
+#pragma warning(pop)
+#endif
for (pointer di = data_; di != data_ + size; ++di)
alloc_.construct (di, value_type());
}
}
if (size_) {
+//Disabled warning C4127 because the conditional expression is constant
+#ifdef _MSC_VER
+#pragma warning(push)
+#pragma warning(disable: 4127)
+#endif
if (! detail::has_trivial_destructor<T>::value) {
+#ifdef _MSC_VER
+#pragma warning(pop)
+#endif
for (pointer si = p_data; si != p_data + size_; ++si)
alloc_.destroy (si);
}
// Handle explict destroy on a (possibly indexed) iterator
BOOST_UBLAS_INLINE
static void iterator_destroy (iterator &i) {
+ (void)(i);
(&(*i)) -> ~value_type ();
}
ALLOC alloc_;