Boost logo

Boost :

From: Stephan Tolksdorf (andorxor_at_[hidden])
Date: 2006-06-21 05:30:56


Hi,

I was looking for a lightweight Allocator interface and found many
references to the UserAllocator interface from Pool:
http://www.boost.org/libs/pool/doc/interfaces/user_allocator.html

I'm not sure if the interface was designed to be used outside of Pool in
the first place, but if one tries to do so, the signature of the free
function becomes a problem. The free function currently takes a char*
const argument, which makes it difficult to use as a deleter for
shared_ptrs and requires a typecast everytime one wants to free memory.
What is the design rationale for not using a (non-const) void* argument?
Could the specification be changed?

Regards,
   Stephan


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk