B
birgir.sigurjonsson
Hei, I am getting compile error on the following code snip:
template <typename S> class Undef;
template <typename S> class A {
public:
A() {}
private:
Undef<S> m_s;
Undef < int > m_r;
};
void my_app() {
// no references to either Undef or A
// however a compiler-error on use of Undef<int>
// but not on Undef<S>
}
I am getting the following error:
The indicated type is incomplete.
Undef < int > m_r;
^
The error is generated on IRIX with MIPSpro Compilers: Version 7.30 and
7.4.2m
and
g++ 3.4.* and 4.0.*
It compiles fine on g++ 3.2, Solaris and Visiual Studio.
So the question is, is this code valid and the compiler are wrong?
Birgir Sigurjonsson.
template <typename S> class Undef;
template <typename S> class A {
public:
A() {}
private:
Undef<S> m_s;
Undef < int > m_r;
};
void my_app() {
// no references to either Undef or A
// however a compiler-error on use of Undef<int>
// but not on Undef<S>
}
I am getting the following error:
The indicated type is incomplete.
Undef < int > m_r;
^
The error is generated on IRIX with MIPSpro Compilers: Version 7.30 and
7.4.2m
and
g++ 3.4.* and 4.0.*
It compiles fine on g++ 3.2, Solaris and Visiual Studio.
So the question is, is this code valid and the compiler are wrong?
Birgir Sigurjonsson.