From: David Bergman (davidb_at_[hidden])
Date: 2004-04-02 13:17:26
Peter Dimov wrote:
> David Bergman wrote:
> > On the meta level, a trait places a Concept in relation to other
> > Concepts, i.e., a trait is STRUCTURAL. On the object-level,
> a Model is
> > related to other Models or Features.
> > trait<Type>::neighbor_type - relates two Concepts
> > trait<Type>::child_type - adds a Feature
> > A policy is BEHAVIORAL. And one often uses policies in a dynamic
> > setting, adding them in runtime. We, of course, often
> implicitly refer
> > to the compile-time policies...
> In A<X>::frobnicate(), 'A' is a policy, because it's
> behavioral, and in
No, A is not behavioral. The feature "frobnicate" of the type X is. And,
that mapped behaviors can definitely be used as a policy.
> template<class B> struct X
> template typename B::value_type value_type; };
> 'B' is a trait, because it's structural?
No, since a trait not only has to be structural, but *also* be a (set of)
meta functions with the Concept as a range.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk