Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r64502 - sandbox/SOC/2010/bit_masks/lib/integer/test/bitfield_vector_testing
From: bbartmanboost_at_[hidden]
Date: 2010-07-31 11:34:52


Author: bbartman
Date: 2010-07-31 11:34:49 EDT (Sat, 31 Jul 2010)
New Revision: 64502
URL: http://svn.boost.org/trac/boost/changeset/64502

Log:
beginning creating a fake allocator to make sure that all of my functions are calling things within the allocator correctly.
Text files modified:
   sandbox/SOC/2010/bit_masks/lib/integer/test/bitfield_vector_testing/bitfield_vector_base_test.cpp | 29 +++++++++++++++++++++++++++++
   1 files changed, 29 insertions(+), 0 deletions(-)

Modified: sandbox/SOC/2010/bit_masks/lib/integer/test/bitfield_vector_testing/bitfield_vector_base_test.cpp
==============================================================================
--- sandbox/SOC/2010/bit_masks/lib/integer/test/bitfield_vector_testing/bitfield_vector_base_test.cpp (original)
+++ sandbox/SOC/2010/bit_masks/lib/integer/test/bitfield_vector_testing/bitfield_vector_base_test.cpp 2010-07-31 11:34:49 EDT (Sat, 31 Jul 2010)
@@ -10,6 +10,35 @@
 #include <boost/type_traits/is_convertible.hpp>
 
 using namespace boost;
+template <class T> class allocator {
+public:
+typedef size_t size_type;
+typedef ptrdiff_t difference_type;
+typedef T* pointer;
+typedef const T* const_pointer;
+typedef T& reference;
+typedef const T& const_reference;
+typedef T value_type;
+template <class U> struct rebind { typedef allocator<U>
+other; };
+
+allocator() throw();
+allocator(const allocator&) throw();
+template <class U> allocator(const allocator<U>&) throw();
+~allocator() throw();
+
+pointer address(reference x) const;
+const_pointer address(const_reference x) const;
+
+pointer allocate(size_type, void* hint = 0);
+void deallocate(pointer p, size_type n);
+size_type max_size() const throw();
+
+void construct(pointer p, const T& val);
+void destroy(pointer p);
+};
+
+
 
 typedef bits<short,2> T;
 typedef std::allocator<int> alloc;


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