Commit 8af3d2c0 by Marcus Winter

base_cpp: revised template argument names in memory_allocation.h

parent 6602c21b
...@@ -521,7 +521,7 @@ class CacheAlignedAllocatable { ...@@ -521,7 +521,7 @@ class CacheAlignedAllocatable {
/* /*
* Forward declaration * Forward declaration
*/ */
template <typename T> template <typename Type>
class Allocator; class Allocator;
/* /*
...@@ -534,8 +534,8 @@ class Allocator < void > { ...@@ -534,8 +534,8 @@ class Allocator < void > {
typedef const void* const_pointer; typedef const void* const_pointer;
typedef void value_type; typedef void value_type;
template <typename U> struct rebind { template <typename OtherType> struct rebind {
typedef Allocator<U> other; typedef Allocator<OtherType> other;
}; };
}; };
...@@ -552,36 +552,36 @@ class Allocator < void > { ...@@ -552,36 +552,36 @@ class Allocator < void > {
* *
* \ingroup CPP_BASE_MEMORY_ALLOCATION * \ingroup CPP_BASE_MEMORY_ALLOCATION
*/ */
template <typename T> template <typename Type>
class Allocator { class Allocator {
public: public:
/** Quantity of elements type */ /** Quantity of elements type */
typedef size_t size_type; typedef size_t size_type;
/** Difference between two pointers type */ /** Difference between two pointers type */
typedef ptrdiff_t difference_type; typedef ptrdiff_t difference_type;
/** Pointer to element type */ /** Pointer to element type */
typedef T* pointer; typedef Type* pointer;
/** Pointer to constant element type */ /** Pointer to constant element type */
typedef const T* const_pointer; typedef const Type* const_pointer;
/** Reference to element type */ /** Reference to element type */
typedef T& reference; typedef Type& reference;
/** Reference to constant element type */ /** Reference to constant element type */
typedef const T& const_reference; typedef const Type& const_reference;
/** Element type */ /** Element type */
typedef T value_type; typedef Type value_type;
/** /**
* Rebind allocator to type U * Rebind allocator to type OtherType
*/ */
template <typename U> struct rebind { template <typename OtherType> struct rebind {
/** Type to rebind to */ /** Type to rebind to */
typedef Allocator<U> other; typedef Allocator<OtherType> other;
}; };
/** /**
...@@ -602,8 +602,8 @@ class Allocator { ...@@ -602,8 +602,8 @@ class Allocator {
* *
* Allows construction from allocators for different types (rebind) * Allows construction from allocators for different types (rebind)
*/ */
template <typename U> Allocator( template <typename OtherType> Allocator(
const Allocator<U>& const Allocator<OtherType>&
/**< [IN] Other allocator object*/ /**< [IN] Other allocator object*/
) )
throw() {} throw() {}
...@@ -642,7 +642,7 @@ class Allocator { ...@@ -642,7 +642,7 @@ class Allocator {
} }
/** /**
* Allocates but doesn't initialize storage for elements of type T * Allocates but doesn't initialize storage for elements of type Type
* *
* \threadsafe * \threadsafe
* *
...@@ -724,7 +724,7 @@ class Allocator { ...@@ -724,7 +724,7 @@ class Allocator {
/* /*
* Forward declaration * Forward declaration
*/ */
template <typename T> template <typename Type>
class AllocatorCacheAligned; class AllocatorCacheAligned;
/* /*
...@@ -737,8 +737,8 @@ class AllocatorCacheAligned < void > { ...@@ -737,8 +737,8 @@ class AllocatorCacheAligned < void > {
typedef const void* const_pointer; typedef const void* const_pointer;
typedef void value_type; typedef void value_type;
template <typename U> struct rebind { template <typename OtherType> struct rebind {
typedef AllocatorCacheAligned<U> other; typedef AllocatorCacheAligned<OtherType> other;
}; };
}; };
...@@ -755,36 +755,36 @@ class AllocatorCacheAligned < void > { ...@@ -755,36 +755,36 @@ class AllocatorCacheAligned < void > {
* *
* \ingroup CPP_BASE_MEMORY_ALLOCATION * \ingroup CPP_BASE_MEMORY_ALLOCATION
*/ */
template< typename T > template< typename Type >
class AllocatorCacheAligned : public Allocator < T > { class AllocatorCacheAligned : public Allocator < Type > {
public: public:
/** Quantity of elements type */ /** Quantity of elements type */
typedef size_t size_type; typedef size_t size_type;
/** Difference between two pointers type */ /** Difference between two pointers type */
typedef ptrdiff_t difference_type; typedef ptrdiff_t difference_type;
/** Pointer to element type */ /** Pointer to element type */
typedef T* pointer; typedef Type* pointer;
/** Pointer to constant element type */ /** Pointer to constant element type */
typedef const T* const_pointer; typedef const Type* const_pointer;
/** Reference to element type */ /** Reference to element type */
typedef T& reference; typedef Type& reference;
/** Reference to constant element type */ /** Reference to constant element type */
typedef const T& const_reference; typedef const Type& const_reference;
/** Element type */ /** Element type */
typedef T value_type; typedef Type value_type;
/** /**
* Rebind allocator to type U * Rebind allocator to type OtherType
*/ */
template <typename U> struct rebind { template <typename OtherType> struct rebind {
/** Type to rebind to */ /** Type to rebind to */
typedef Allocator<U> other; typedef Allocator<OtherType> other;
}; };
/** /**
...@@ -799,16 +799,16 @@ class AllocatorCacheAligned : public Allocator < T > { ...@@ -799,16 +799,16 @@ class AllocatorCacheAligned : public Allocator < T > {
const AllocatorCacheAligned& a const AllocatorCacheAligned& a
/**< [IN] Other allocator object */ /**< [IN] Other allocator object */
) throw() ) throw()
: Allocator < T >(a) { } : Allocator < Type >(a) { }
/** /**
* Constructs allocator object * Constructs allocator object
* *
* Allows construction from allocators for different types (rebind) * Allows construction from allocators for different types (rebind)
*/ */
template<typename U> template<typename OtherType>
AllocatorCacheAligned( AllocatorCacheAligned(
const AllocatorCacheAligned<U>& const AllocatorCacheAligned<OtherType>&
/**< [IN] Other allocator object*/ /**< [IN] Other allocator object*/
) throw() { } ) throw() { }
...@@ -818,7 +818,7 @@ class AllocatorCacheAligned : public Allocator < T > { ...@@ -818,7 +818,7 @@ class AllocatorCacheAligned : public Allocator < T > {
~AllocatorCacheAligned() throw() { } ~AllocatorCacheAligned() throw() { }
/** /**
* Allocates but doesn't initialize storage for elements of type T * Allocates but doesn't initialize storage for elements of type Type
* *
* \threadsafe * \threadsafe
* *
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment