This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Problem with Compilerupdate 3.3.5 -> 4.0.2


Hello dear gcc-helper,

I have a program without problems compiling with 3.3.5 but don't work with 
4.0.2. So here is the question: are there big differences in templates 
combined with inheritance between these versions?

I give you a part of the code:

template<typename T> class Vector{

    protected:
		T	*vectorPtr;
		size_type dim;						<<<<<
		unsigned short coutwidth;
...
};

template<typename T> class NumericVector : public Vector<T>{

    public:
		NumericVector() : Vector<T>(){}
		NumericVector(size_type dim) : Vector<T>(dim){}
		NumericVector(size_type dim, T initVal) : Vector<T>(dim, initVal){}
		NumericVector( const Vector<T> &src );
		
		void makeHilb();
};

template<typename T> NumericVector<T>::NumericVector( const Vector<T> &src ){

	dim 		= src.length();                                             <<<<<<<
	vectorPtr 	= NULL;
	unsigned short counter 	= 3;
...
}

in the program i use NumericVector. the compiler 4.0.2 says he don't know       
dim
in the convertconstructor of NumericVector

the older one is fine with this program.

Can anybody explain why there is a problem?

Thanks, cris


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]