Compare commits

..

3 Commits

Author SHA1 Message Date
Marshall Clow
ccb1f93113 Release 1.54.0
[SVN r84923]
2013-07-01 16:53:14 +00:00
Marshall Clow
6998f28fda Apply patch to release branch; Fixes #8032
[SVN r84450]
2013-05-23 18:45:31 +00:00
Jan Gaspar
ed237fa058 circular_buffer: fixed when BOOST_NO_STDC_NAMESPACE defined
[SVN r66704]
2010-11-23 19:45:36 +00:00
2 changed files with 11 additions and 5 deletions

View File

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

View File

@@ -1300,7 +1300,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 item,
static size_type init_capacity(const capacity_type& capacity_ctrl, IntegralType n, IntegralType,
const true_type&) {
return init_capacity(capacity_ctrl, static_cast<size_type>(n));
}
@@ -1320,7 +1320,7 @@ private:
//! Specialized method for determining the initial capacity.
template <class InputIterator>
static size_type init_capacity(const capacity_type& capacity_ctrl, InputIterator first, InputIterator last,
static size_type init_capacity(const capacity_type& capacity_ctrl, InputIterator, InputIterator,
const std::input_iterator_tag&) {
return capacity_ctrl.capacity();
}