A dependent name is essentially a name that depends on a template argument.
When using templates there is a distinction between the point of definition of the template and the point of instantiation i.e. where you actually use the template. Names that depend on a template don't get bound until the point of instantiation whereas names that don't get bound at the point of definition.
A simple example would be:
template< class T > int addInt( T x )
{
return i + x.toInt();
}
where a declaration or definition of i
would need to appear before the definition given above since i
does not depend on the template argument T
and is therefore bound at the point of definition. The definition of the toInt
member of the as-yet-unknown-type x
variable only has to appear before the addInt
function is actually used somewhere as it is a dependent name ( technically the point of instantiation is taken as the nearest enclosing global or namespace scope just before the point of use and so it has to be available before that ).