
"Rozental, Gennadiy" <gennadiy.rozental@thomson.com> writes:
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"
I don't know what "primary type" means here.
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.
Technically one can never say "class template foo is a traits template" or "class template foo is a policy" without examining how it's used. There's no fundamental reason that the same class template can't be used in both ways, so for any given class template, there may be no either/or answer. -- Dave Abrahams Boost Consulting www.boost-consulting.com