typedef of a template with a template type as its parameter
Posted
by
bryan sammon
on Stack Overflow
See other posts from Stack Overflow
or by bryan sammon
Published on 2012-08-29T21:06:43Z
Indexed on
2012/08/29
21:38 UTC
Read the original article
Hit count: 440
Im having a problem with a typedef below, I can seem to get it right:
template <typename T>
struct myclass1 {
static const int member1 = T::GetSomeInt();
};
template <int I>
struct myclass2 {
typedef myclass1< myclass2<I> > anotherclass;
static int GetSomeInt();
};
anotherclass MyObj1; // ERROR here not instantiating the class
When I try and initialize a anotherclass object, it gives me an error.
Any idea what I am doing wrong? There seems to be a problem with my typedef.
Any help is appreciated, Thanks Bryan
© Stack Overflow or respective owner