Possible Duplicate:
Two phase lookup - explanation needed
When I'm using a template class the compiler doesn't show me errors/warning of missing #includes.
For example, If I have a class called "A" and it looks much or less like this :
template<class T>
class A {
void print() const {cout << "Hey I didn't use include for
iostream and It works just fine!!!";}
};
If I remove the template < class T > I get errors of the absence of <iostream >include.
Why the compiler doesn't show these errors when I'm using template class ?
Just to point out, when I say It works I mean It doesn't show me any compilation errors when I'm writing the class but only when I use it as opposed to a non-template class whereas the error shows immediately.