Boost logo

Boost :

From: Rozental, Gennadiy (gennadiy.rozental_at_[hidden])
Date: 2004-04-01 17:25:30

> > both for that type. A trait class is never passed as a template
> > parameter; it's name is ubiquitous.
> Whoops, can't agree there. The boost type traits are passed
> as template parameters all the time:
> mpl::apply_if<
> is_pointer<X>, remove_pointer<X>, add_reference<X>
> >

What he meant, I think, is "never passed as a template parameter together
with primary type"
> > A traits class never has state.
> >
> > Policy - A class template passed to other templates for the
> purpose of
> > providing a named grouping of metainformation,
> I think a Policy might be a non-templated class.


> I think your definitions are mostly on target, but I think
> where you go wrong is that traits/policies has less to do
> with how a template is defined than how it's used.

Could you please rephrase. It's a bit unclear.


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