In code:
template<class T>
struct FactorPolicy
{
T factor_;
FactorPolicy(T value):factor_(value)
{
}
};
template<class T, template<class> class Policy = FactorPolicy>
struct Map
{
};
int _tmain(int argc, _TCHAR* argv[])
{
Map<int,FactorPolicy> m;//in here I would like to pass a double value to a
//FactorPolicy but I do not know how.
return 0;
}
Edited [for Mark H]
template<class T, template<class> class Policy = FactorPolicy>
struct Map : Policy<double>
{
Map(double value):Policy<double>(value)
{
}
};