Get malloc_allocator working with Visual C++ 6 STL.

[SVN r7383]
This commit is contained in:
Daniel James
2007-07-07 09:39:31 +00:00
parent 10a05bda05
commit e4b6b89ed2

View File

@@ -47,6 +47,15 @@ namespace test
bool operator==(malloc_allocator const& x) const { return true; }
bool operator!=(malloc_allocator const& x) const { return false; }
#if BOOST_WORKAROUND(BOOST_MSVC, < 1300)
template <class T> void deallocate(T* p, size_type) {
free(p);
}
char* _Charalloc(size_type n) {
return static_cast<char*>(malloc(n * sizeof(char)));
}
#endif
};
}