Trailing whitespaces

[SVN r78519]
This commit is contained in:
Ion Gaztañaga
2012-05-20 10:03:06 +00:00
parent 9460e03224
commit 082c47b721
27 changed files with 371 additions and 151 deletions
+11 -11
View File
@@ -38,19 +38,19 @@ namespace boost {
namespace container {
namespace test {
//!An STL compatible heap_allocator_v1 that uses a segment manager as
//!An STL compatible heap_allocator_v1 that uses a segment manager as
//!memory source. The internal pointer type will of the same type (raw, smart) as
//!"typename SegmentManager::void_pointer" type. This allows
//!placing the heap_allocator_v1 in shared memory, memory mapped-files, etc...*/
template<class T, class SegmentManager>
class heap_allocator_v1
class heap_allocator_v1
{
private:
typedef heap_allocator_v1<T, SegmentManager> self_t;
typedef SegmentManager segment_manager;
typedef typename segment_manager::void_pointer aux_pointer_t;
typedef typename
typedef typename
boost::pointer_to_other
<aux_pointer_t, const void>::type cvoid_ptr;
@@ -80,7 +80,7 @@ class heap_allocator_v1
//!Obtains an heap_allocator_v1 of other type
template<class T2>
struct rebind
{
{
typedef heap_allocator_v1<T2, SegmentManager> other;
};
@@ -97,19 +97,19 @@ class heap_allocator_v1
{ return const_pointer(addressof(value)); }
*/
//!Constructor from the segment manager. Never throws
heap_allocator_v1(segment_manager *segment_mngr)
heap_allocator_v1(segment_manager *segment_mngr)
: mp_mngr(segment_mngr) { }
//!Constructor from other heap_allocator_v1. Never throws
heap_allocator_v1(const heap_allocator_v1 &other)
heap_allocator_v1(const heap_allocator_v1 &other)
: mp_mngr(other.get_segment_manager()){ }
//!Constructor from related heap_allocator_v1. Never throws
template<class T2>
heap_allocator_v1(const heap_allocator_v1<T2, SegmentManager> &other)
heap_allocator_v1(const heap_allocator_v1<T2, SegmentManager> &other)
: mp_mngr(other.get_segment_manager()){}
//!Allocates memory for an array of count elements.
//!Allocates memory for an array of count elements.
//!Throws boost::container::bad_alloc if there is no enough memory
pointer allocate(size_type count, cvoid_ptr hint = 0)
{ (void)hint; return ::new value_type[count]; }
@@ -118,7 +118,7 @@ class heap_allocator_v1
void deallocate(const pointer &ptr, size_type)
{ return ::delete[] detail::get_pointer(ptr) ; }
//!Construct object, calling constructor.
//!Construct object, calling constructor.
//!Throws if T(const T&) throws
void construct(const pointer &ptr, const_reference value)
{ new((void*)detail::get_pointer(ptr)) value_type(value); }
@@ -139,13 +139,13 @@ class heap_allocator_v1
//!Equality test for same type of heap_allocator_v1
template<class T, class SegmentManager> inline
bool operator==(const heap_allocator_v1<T , SegmentManager> &alloc1,
bool operator==(const heap_allocator_v1<T , SegmentManager> &alloc1,
const heap_allocator_v1<T, SegmentManager> &alloc2)
{ return alloc1.get_segment_manager() == alloc2.get_segment_manager(); }
//!Inequality test for same type of heap_allocator_v1
template<class T, class SegmentManager> inline
bool operator!=(const heap_allocator_v1<T, SegmentManager> &alloc1,
bool operator!=(const heap_allocator_v1<T, SegmentManager> &alloc1,
const heap_allocator_v1<T, SegmentManager> &alloc2)
{ return alloc1.get_segment_manager() != alloc2.get_segment_manager(); }