[Boot.Pool] Opinions about inconsistent pointer types
Hi,
I was looking through the Pool code and noticed that it presents
inconsistent pointer types to the user ("void *" versus "char *").
For example, if the user wants to implement his/her own user
allocator, they have to write it like, e.g. (using "char *" as the
pointer type):
struct default_user_allocator_new_delete
{
typedef std::size_t size_type;
typedef std::ptrdiff_t difference_type;
static char * malloc(const size_type bytes)
{ return new (std::nothrow) char[bytes]; }
static void free(char * const block)
{ delete [] block; }
};
However, other classes return "void *" as their pointer types, e.g.
singleton_pool:
template
participants (1)
-
David Baird