Boost logo

Boost :

From: Thorsten Ottosen (nesotto_at_[hidden])
Date: 2004-03-02 18:51:10


"Powell, Gary" <powellg_at_[hidden]> wrote in message
news:16D81990DBE42642A8CA977A55FF116A02D9F637_at_ex-mail-sea-02.ant.amazon.com...
> After a quick look at the Assignment library, it would appear that this
library would benefit from a "container traits" library that it could query
for things like whether to use "insert" or "push" to call for
make_insertion() rather than specify each std::stl container.

It's only on vc6 that each header is included; normal compilers can do much
better.

I think there is a way to do this without including each header, but it
probably won't work with many compilers. So it all depends on a
portable hack that can detect member functions or member typedefs of certain
names.

> It just doesn't seem to be very extensible. Rather wouldn't it be better
if a user could define the traits class for your container and then the
assignment would pick the >right one?

Maybe. Why do you think its better with a traits class compared to a ADL of
a user-overloaded function?

br

Thorsten


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk