Compare commits

..

1 Commits

Author SHA1 Message Date
Beman Dawes
56482eb256 Release 1.43.0 beta 1
[SVN r61461]
2010-04-21 14:13:35 +00:00
2 changed files with 13 additions and 11 deletions

View File

@@ -34,12 +34,6 @@
#include <stddef.h>
#endif
#if defined(BOOST_NO_STDC_NAMESPACE)
namespace std {
using ::memset;
}
#endif
namespace boost {
/*!
@@ -2087,7 +2081,7 @@ private:
throw_exception(std::length_error("circular_buffer"));
#if BOOST_CB_ENABLE_DEBUG
pointer p = (n == 0) ? 0 : m_alloc.allocate(n, 0);
std::memset(p, cb_details::UNINITIALIZED, sizeof(value_type) * n);
::memset(p, cb_details::UNINITIALIZED, sizeof(value_type) * n);
return p;
#else
return (n == 0) ? 0 : m_alloc.allocate(n, 0);
@@ -2130,7 +2124,7 @@ private:
m_alloc.destroy(p);
#if BOOST_CB_ENABLE_DEBUG
invalidate_iterators(iterator(this, p));
std::memset(p, cb_details::UNINITIALIZED, sizeof(value_type));
::memset(p, cb_details::UNINITIALIZED, sizeof(value_type));
#endif
}
@@ -2316,7 +2310,7 @@ private:
}
//! Specialized method for swapping the allocator.
void swap_allocator(circular_buffer<T, Alloc>&, const true_type&) {
void swap_allocator(circular_buffer<T, Alloc>& cb, const true_type&) {
// Swap is not needed because allocators have no state.
}

View File

@@ -1260,7 +1260,11 @@ private:
ensure_reserve(new_capacity, new_size));
}
#if BOOST_CB_ENABLE_DEBUG
# if BOOST_WORKAROUND(__DECCXX_VER, BOOST_TESTED_AT(70190006))
this->invalidate_iterators_except(end());
# else
invalidate_iterators_except(end());
# endif
#endif
}
@@ -1280,7 +1284,11 @@ private:
circular_buffer<T, Alloc>::set_capacity(
ensure_reserve(new_capacity, size()));
#if BOOST_CB_ENABLE_DEBUG
# if BOOST_WORKAROUND(__DECCXX_VER, BOOST_TESTED_AT(70190006))
this->invalidate_iterators_except(end());
# else
invalidate_iterators_except(end());
# endif
#endif
}
@@ -1300,7 +1308,7 @@ private:
//! Specialized method for determining the initial capacity.
template <class IntegralType>
static size_type init_capacity(const capacity_type& capacity_ctrl, IntegralType n, IntegralType,
static size_type init_capacity(const capacity_type& capacity_ctrl, IntegralType n, IntegralType item,
const true_type&) {
return init_capacity(capacity_ctrl, static_cast<size_type>(n));
}
@@ -1320,7 +1328,7 @@ private:
//! Specialized method for determining the initial capacity.
template <class InputIterator>
static size_type init_capacity(const capacity_type& capacity_ctrl, InputIterator, InputIterator,
static size_type init_capacity(const capacity_type& capacity_ctrl, InputIterator first, InputIterator last,
const std::input_iterator_tag&) {
return capacity_ctrl.capacity();
}