Nonstandard allocator::pointer in containers

Paolo Carlini
Mon May 23 16:44:00 GMT 2005

Martin Sebor wrote:

> IIRC, it was a lot more work than just that. With user-defined
> pointers you can't make many of the assumptions and optimizations
> that you can otherwise. For example, you can't assume that such
> pointer types are convertible to true pointers (such as void*),
> you might need to be prepared to deal with exceptions where they
> normally cannot occur, you can't use memcpy to copy objects of
> user-defined pointers, etc.

I see, thanks. It looks like this strongly depends on the container:
std::vector seems doable, as a start.


More information about the Libstdc++ mailing list