Boost logo

Boost :

From: John Max Skaller (skaller_at_[hidden])
Date: 2001-05-21 19:27:58

scleary_at_[hidden] wrote:

> > No problem. The existing words permit the Standard
> > Library to assume allocators are 'compatible'. That means
> > if YOU, the programmer, splice two lists which use
> > incompatible allocators, it is YOUR problem.
> OK, I can go with this. But that *has* to be spelled out in the Standard
> exactly when it could be a problem -- right now, *all* containers can make
> that assumption *all* the time...

        Replace 'must' with 'is desirable'. :-)

        Go ahead and try. Most committee members would probably
support this (if they think allocators are worth rescuing at all).
> It would probably be nice to have an allocator_traits of some kind, which
> could specify if the allocator is instance-based or not. This would allow
> such usage errors to be caught at compile-time.

        I don't know. I really dislike 'traits'.
They're a non-local technique, using traits requires defining
specialisations of something global, just to define something
local. This is bad, in general. However, making something
work at all may be better than nothing :-)

John (Max) Skaller, mailto:skaller_at_[hidden]
10/1 Toxteth Rd Glebe NSW 2037 Australia voice: 61-2-9660-0850
checkout Vyper
download Interscript

Boost list run by bdawes at, gregod at, cpdaniel at, john at