Boost logo

Boost-Commit :

From: daniel_james_at_[hidden]
Date: 2008-01-10 15:23:39


Author: danieljames
Date: 2008-01-10 15:23:39 EST (Thu, 10 Jan 2008)
New Revision: 42662
URL: http://svn.boost.org/trac/boost/changeset/42662

Log:
Some more 'using namespace std' - this time for the C memory allocators.
Text files modified:
   branches/unordered/trunk/libs/unordered/test/helpers/allocator.hpp | 8 +++++++-
   1 files changed, 7 insertions(+), 1 deletions(-)

Modified: branches/unordered/trunk/libs/unordered/test/helpers/allocator.hpp
==============================================================================
--- branches/unordered/trunk/libs/unordered/test/helpers/allocator.hpp (original)
+++ branches/unordered/trunk/libs/unordered/test/helpers/allocator.hpp 2008-01-10 15:23:39 EST (Thu, 10 Jan 2008)
@@ -38,11 +38,15 @@
         const_pointer address(const_reference r) { return &r; }
 
         pointer allocate(size_type n) {
+ using namespace std;
             return static_cast<T*>(malloc(n * sizeof(T)));
         }
 
         pointer allocate(size_type n, const_pointer u) { return allocate(n); }
- void deallocate(pointer p, size_type) { free(p); }
+ void deallocate(pointer p, size_type) {
+ using namespace std;
+ free(p);
+ }
         void construct(pointer p, T const& t) { new(p) T(t); }
         void destroy(pointer p) { p->~T(); }
 
@@ -55,9 +59,11 @@
 
 #if BOOST_WORKAROUND(BOOST_MSVC, < 1300)
         template <class T> void deallocate(T* p, size_type) {
+ using namespace std;
             free(p);
         }
         char* _Charalloc(size_type n) {
+ using namespace std;
             return static_cast<char*>(malloc(n * sizeof(char)));
         }
 #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