From: David Abrahams (abrahams_at_[hidden])
Date: 2001-02-12 09:13:47
----- Original Message -----
From: "Peter Dimov" <pdimov_at_[hidden]>
> > I've checked in a preliminary generic programming techniques reference
> > at more/generic_programming.html. You may want to place links into this
> > in new boost documentation.
> Traits associate information with a compile-time entity. It can be a type,
> an integral constant, or an address.
> In "For an in-depth description of std::type_traits" 'std::type_traits'
> should be std::iterator_traits.
> A variation of the Traits idiom is what I call "dynamic traits," although
> the established name is "External polymorphism." Dynamic traits
> associate a vtable with a compile-time entity, usually a type. Since it's
> not possible (portably) to get to the vtable in C++, I usually store a
> pointer to an empty singleton (contains only the vptr.)
> The technique allows "adding" polymorphic behaviour to a non-polymorphic
That's interesting, but still a bit vague. If you'd like to have something
added to the page, please write it up in html and send it to me; I'll be
glad to put it in CVS.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk