B
Barzo
Hi,
I've two problems on compiling the following example with Eclipse and
GCC.
1 namespace MyNamespace
2 {
3 template<class T>
4 class ClassA
5 {
6 public:
7 typedef enum EnumA {A, B, C};
8
9 void Method(EnumA value);
10
11 static MyOtherClass::ReturnValues StaticMember()
12 {
13 //..do something..
14 };
15 }
16
17 template<class T>
18 class ClassB : ClassA<T>
19 {
20 public:
21 void Method(EnumA value);
22 }
23
24 }
At line 11 I get:
"type 'MyOtherClass' is not derived from type
'MyNamespace::ClassA<T>'"
At line 21 I get:
"'EnumA' has not been declared"
For the first error I don't have idea how to fix, MyOtherClass a class
defined!
For the second I think I have to specify the entire name:
MyNamespace::ClassA<T>::EnumA
but is there a less verbose method?!
Could someone give me some suggestions?
Thanks!
Daniele.
I've two problems on compiling the following example with Eclipse and
GCC.
1 namespace MyNamespace
2 {
3 template<class T>
4 class ClassA
5 {
6 public:
7 typedef enum EnumA {A, B, C};
8
9 void Method(EnumA value);
10
11 static MyOtherClass::ReturnValues StaticMember()
12 {
13 //..do something..
14 };
15 }
16
17 template<class T>
18 class ClassB : ClassA<T>
19 {
20 public:
21 void Method(EnumA value);
22 }
23
24 }
At line 11 I get:
"type 'MyOtherClass' is not derived from type
'MyNamespace::ClassA<T>'"
At line 21 I get:
"'EnumA' has not been declared"
For the first error I don't have idea how to fix, MyOtherClass a class
defined!
For the second I think I have to specify the entire name:
MyNamespace::ClassA<T>::EnumA
but is there a less verbose method?!
Could someone give me some suggestions?
Thanks!
Daniele.