Re: Multiple level inheritance in policy classes
On Feb 25, 9:51 pm, Xavier Pegenaute <xpegena...@gmail.com> wrote:
....
------------ SonPolicy ---------------
template<template <class> class FatherPolicy, class Type>
class SonPolicy : public FatherPolicy<Type> {
};
....
------------ Manager ---------------
template<template <class> class FatherPolicy, template <class> class
SonPolicy, class Type>
class Manager : public SonPolicy<FatherPolicy<Type>, Type> {
The SonPolicy you have here takes one class parameter, and you've
given two class parameters.
Judging by the rest of the code this should be:
template<
template <class> class FatherPolicy,
template <template <class> class, class > class SonPolicy,
class Type>
class Manager : public SonPolicy<FatherPolicy, Type> {
(Note 'FatherPolicy' not 'FatherPolicy<Type>', but you got that right
earlier so I assume you understand the point.)
Reusing the names FatherPolicy and SonPolicy for both the actual
templates and the template parameters caused me some confusion, but
I'm not sure I could find a better way to do it.
Yechezkel Mett
--
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]