[Pool] Type signature of UserAllocator::free

21 Jun
2006
21 Jun
'06
9:30 a.m.
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
6933
Age (days ago)
6933
Last active (days ago)
0 comments
1 participants
participants (1)
-
Stephan Tolksdorf