?
=?ISO-8859-1?Q?Erik_Wikstr=F6m?=
I've been trying for a while now to understand how template template
parameters work. But I just can't wrap my head around it and was hoping
that someone might help me. As best I can figure the code should look
something like this:
template<template<typename S> typename T>
struct element_traits {
typedef S type;
};
But since it does not work I'd best describe what I want it to
accomplish. If I have a template class A and a template parameter B
(that would be A<B>) I would like the template above to to typedef B to
'type'. So element_traits< A<B> >::type should be of type B.
Question: What am I missing?
Erik Wikström
parameters work. But I just can't wrap my head around it and was hoping
that someone might help me. As best I can figure the code should look
something like this:
template<template<typename S> typename T>
struct element_traits {
typedef S type;
};
But since it does not work I'd best describe what I want it to
accomplish. If I have a template class A and a template parameter B
(that would be A<B>) I would like the template above to to typedef B to
'type'. So element_traits< A<B> >::type should be of type B.
Question: What am I missing?
Erik Wikström