As far as I know, mixin is when you first write a derived class, and then you can enter a base class to it using the template parameter.
Example: http://www.drdobbs.com/cpp/mixin-based-programming-in-c/184404445
As I know, policy-based design is for the same.
http://en.wikipedia.org/wiki/Policy-based_design
It does not say what you should learn from it, you can also use the template parameter in other ways. However, for example, on Wikipedia, an example of rule-based development looks something like this:
template<typename Base>
class Derive: private Base
What I think is the same as mixin. (instead, in mixins you usually use public inheritance)
Is there a significant difference between the two or mixin is a special case of policy-based development?
source
share