|
Boost : |
From: Rob Stewart (stewart_at_[hidden])
Date: 2004-04-02 10:52:18
From: "Rozental, Gennadiy" <gennadiy.rozental_at_[hidden]>
>
> > Trait - A class template parameterized on a single type that
> > associates information with that type. A traits class,
> > therefore, provides an external, named grouping of
> > metainformation, behavior, or both for that type. A trait
> > class is never passed as a template parameter; it's name is
> > ubiquitous. A traits class never has state.
>
> By state you mean non-static data members, yes?
Yes.
> > Policy - A class template passed to other templates for the
> > purpose of providing a named grouping of metainformation,
> > behavior, or both to those templates. Because it is a
> > template parameter, different policy classes can be used as
> > desired. In many cases, a policy class is used as a base class.
>
> Well, apparently there is somebody who think the same as I do.
>
> Thank you Rob, for your definitions. They seems sound and close to what I
> have in mind.
I'm hoping we can all come to agree on something that usefully
distinguishes these terms. It is a hindrance to communication if
everyone brings a different interpretation of the words to a
conversation and if the two are thought to be completely
interchangeable, then why use both?
-- Rob Stewart stewart_at_[hidden] Software Engineer http://www.sig.com Susquehanna International Group, LLP using std::disclaimer;
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk