I'm doing some contribution to an open source library, but I'm having trouble modifying other people's code. Previously the library had a file called IntervalT.h and a file called Curves.h with the implementation in the file Curves.tcc, and Interval.h includes Curves.h for some reason. Right now I need to use IntervalT.h in Curves.h, but when I tried to use the class IntervalT<NT> defined in IntervalT.h, the compiler gives me error (I've already included IntervalT.h in the beginning of Curves.h file):
../../../inc/CORE/poly/Curves.h:1337:3: error: ‘IntervalT’ does not name a type
My question is: Since I never have had such experience before, is "does not name a type" error related to mutual inclusion of c++ header files? Or it is other mistakes that cause this error? If so, how should I write my program to let the Curves.h sees IntervalT.h?
By the way, this piece of code was organized in a very weird way. Curves.tcc is actually included by Curves.h, which is the reverse way of we usually do. Is there a particular reason to do this? Or it doesn't really matter? And what is .tcc extension after all?