
31 Aug
2008
31 Aug
'08
1:58 a.m.
Phil Bouchard:
Interesting but unfortunate we cannot mix pools within allocators because it makes allocators even less flexible (useful).
You can mix pools, but all copies must share the same pool. A conforming allocator should not contain the pool itself, but a pointer to the pool. Two allocators should compare equal when they point to the same pool. It doesn't make much sense for each shared_ptr to use its own private pool anyway. shared_ptr only allocates once.