J
John Goche
Hello,
Consider the following example:
template <class T>
class A {
private:
T foo;
public:
T Foo() { return foo; }
class B {
private:
T bar;
public:
void FooBar();
T Bar() { return 2 * bar; }
};
};
template <class T>
A<T>::B::FooBar() { }
upong compiling I get the following error:
'typename' is missing in template argument dependent qualified type
which goes away when I type
typename template <class T>
A<T>::B::FooBar() { }
I do not understand why the compiler is confused about A<T>::B being a
type?
What else could it be?
Thanks,
JG
Consider the following example:
template <class T>
class A {
private:
T foo;
public:
T Foo() { return foo; }
class B {
private:
T bar;
public:
void FooBar();
T Bar() { return 2 * bar; }
};
};
template <class T>
A<T>::B::FooBar() { }
upong compiling I get the following error:
'typename' is missing in template argument dependent qualified type
which goes away when I type
typename template <class T>
A<T>::B::FooBar() { }
I do not understand why the compiler is confused about A<T>::B being a
type?
What else could it be?
Thanks,
JG