Re: name binding from one template to another
Thanks Igor,
Why in my sample below, variable a and tmp is not in the category of
dependent names? From what point of view did compiler judge your below
mentioned categories are dependent names?
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?
template <class T> void func (T a)
{
vector<T> vc;
T tmp = a;
vc.push_back (a);
return;
}
regards,
George
"Igor Tandetnik" wrote:
"George" <George@discussions.microsoft.com> wrote in message
news:E54A8FDB-73DF-4EFC-9628-8C6A7FDC00E5@microsoft.com
Could you recommend a definition for what is dependent name please?
SomeType::name where SomeType depends on template parameters.
SomeExpr.name or SomeExpr->name where SomeExpr is an expression whose
type depends on template parameters.
name(expr1, expr2, ...) where at least one of expr_i is of type that
depends on template parameters.
--
With best wishes,
Igor Tandetnik
With sufficient thrust, pigs fly just fine. However, this is not
necessarily a good idea. It is hard to be sure where they are going to
land, and it could be dangerous sitting under them as they fly
overhead. -- RFC 1925