This is the mail archive of the libstdc++@sourceware.cygnus.com 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]

Re: [Fwd: allocators not conformant to standard]


Craig,

Sorry about not responding to your earlier message.  Probably just a
momentary lapse of consciousness; I don't remember having seen it
before.

In any case, though, our default allocator does take a hint parameter.
(If you've got __STL_USE_STD_ALLOCATORS defined, that is.  I'm talking
about the allocator<> class, which attempts to be standard-conforming,
rather than the alloc class, which does not.)  See allocator<>::allocate(),
in line 602 of stl_alloc.h.  As you'll see, we have a hint parameter and
we don't do anything with it.

Unfortunately, passing the address of the container as a hint would not
be standard-conforming.  If you combine what tables 31 and 32 say, you'll
see that the hint parameter must be either a null pointer or else something
returned by a previous call to allocate().

			--Matt

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