Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r66704 - branches/release/boost/circular_buffer
From: jano_gaspar_at_[hidden]
Date: 2010-11-23 14:45:38


Author: jano_gaspar
Date: 2010-11-23 14:45:36 EST (Tue, 23 Nov 2010)
New Revision: 66704
URL: http://svn.boost.org/trac/boost/changeset/66704

Log:
circular_buffer: fixed when BOOST_NO_STDC_NAMESPACE defined
Text files modified:
   branches/release/boost/circular_buffer/base.hpp | 10 ++++++++--
   1 files changed, 8 insertions(+), 2 deletions(-)

Modified: branches/release/boost/circular_buffer/base.hpp
==============================================================================
--- branches/release/boost/circular_buffer/base.hpp (original)
+++ branches/release/boost/circular_buffer/base.hpp 2010-11-23 14:45:36 EST (Tue, 23 Nov 2010)
@@ -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 @@
             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 @@
         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
     }
 


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk