J
Jon Slaughter
struct NullClass { void Null() { } };
template <unsigned int i, typename T>
struct Node
{
enum {I = i};
typedef T Class;
};
template <unsigned int I, class NodeList>
struct sTree
{
sTree<I-1, NodeList> List;
void Base() { };
};
template <unsigned int I, class T1, class T2>
struct sTree<I, Typelist<T1, T2> >
// : TL::TypeAtNonStrict<Typelist<T1,T2>, 1, NullClass >
{
sTree<I-1, Typelist<T1,T2> > List;
void End() { };
};
template <typename NodeList>
struct sTree<0, NodeList>
{
void End() { };
};
In the above code I get an error on the specialization of Typelist type
because it can't figure out if sTree<I-1, Typelist<T1,T2> > List; is of the
template or its specialization.
The exact error is:
c:\documents and settings\jon\my documents\visual studio
2005\projects\typelist\typelist\test.cpp(45) : error C2752:
'sTree<I,NodeList>' : more than one partial specialization matches
I don't have a clue what it means by "more than one" because I only have 2
and the other one doesn't match at all... unless it is calling the template
itself a partial specialization?
Any ideas?
Thanks, Jon
template <unsigned int i, typename T>
struct Node
{
enum {I = i};
typedef T Class;
};
template <unsigned int I, class NodeList>
struct sTree
{
sTree<I-1, NodeList> List;
void Base() { };
};
template <unsigned int I, class T1, class T2>
struct sTree<I, Typelist<T1, T2> >
// : TL::TypeAtNonStrict<Typelist<T1,T2>, 1, NullClass >
{
sTree<I-1, Typelist<T1,T2> > List;
void End() { };
};
template <typename NodeList>
struct sTree<0, NodeList>
{
void End() { };
};
In the above code I get an error on the specialization of Typelist type
because it can't figure out if sTree<I-1, Typelist<T1,T2> > List; is of the
template or its specialization.
The exact error is:
c:\documents and settings\jon\my documents\visual studio
2005\projects\typelist\typelist\test.cpp(45) : error C2752:
'sTree<I,NodeList>' : more than one partial specialization matches
I don't have a clue what it means by "more than one" because I only have 2
and the other one doesn't match at all... unless it is calling the template
itself a partial specialization?
Any ideas?
Thanks, Jon