This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Nonstandard allocator::pointer in containers


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.

Paolo.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]