Thanks CornedBee,


What is your rule to decide what is a dependent name or not?

If compiler judge from the point that if the type is unknown until instantiation time, then it belongs to dependent name, then a, tmp and along with push_back are both dependent names. So, what makes me confused is compiler's metrics about what is dependent name and what is not. Any ideas or comments?

Code:
template <class T> void func (T a)
{
vector<T> vc;
T tmp = a;
vc.push_back (a);

return;
}
Quote Originally Posted by CornedBee View Post
No. The only dependent name in this sample is push_back, and that's an extremely simple case.

regards,
George