This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: Nonstandard allocator::pointer in containers
- From: Paolo Carlini <pcarlini at suse dot de>
- To: Martin Sebor <sebor at roguewave dot com>
- Cc: libstdc++ at gcc dot gnu dot org
- Date: Mon, 23 May 2005 18:44:42 +0200
- Subject: Re: Nonstandard allocator::pointer in containers
- References: <4291F686.5060809@chezphil.org> <42920613.4060808@roguewave.com>
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.