Problem declaring template class functions

Ivan Martinez ex08@kalman.iau.dtu.dk
Wed Apr 19 11:49:00 GMT 2000


	Hello all,
	I have a template class declared in a header file like this:

template <class Type>
class ClassA
{
  ...
  void Func1();
  bool Func2(Type);
}

	Its functions are declared in a code file like this:

template <class Type>
bool ClassA<Type>::Func1()
{
  ...
}
template <class Type>
bool ClassA<Type>::Func2(Type)
{
  ...
}

	Why when I try to call the functions I get a "undefined reference
to..." error?. Also KDevelop shows them as global functions.
	I address this question to this list because I heard GCC is a bit
different to standard in this issues.
	Thank you. Regards,
-- 
Ivan Martinez (Rodriguez)
Bch in Computer Science - MSc student
http://www.student.dtu.dk/~u990873
"Got fabes?"


More information about the Gcc-help mailing list