Hello everyone,
About Bjarne's statement in section C.13.8.3 Point of Instantiation Binding, I have made some further thinking and coding. Here are my two questions.
--------------------
Nor can an unqualified name used in a template ever be bound to a local name.
--------------------
1. Sometimes we use qualified name in template? I have never usage of qualified names in template. Does Bjarne means some code like this, Does such use rare?
(suppose Foo is a template class)
Foo<::myType> or Foo<Somenamespace::myType> or Foo<SomeClass::myType>
2,
Does Bjarne indicate qualified names used in a template coule be bound to a local name? For example, we define a local namespace, put a struct in the local namespace, then we could use localNameSpace::strctInLocalNameSpace to instantise the template?
Puesdu code like this.
thanks in advance,
George
About Bjarne's statement in section C.13.8.3 Point of Instantiation Binding, I have made some further thinking and coding. Here are my two questions.
--------------------
Nor can an unqualified name used in a template ever be bound to a local name.
--------------------
1. Sometimes we use qualified name in template? I have never usage of qualified names in template. Does Bjarne means some code like this, Does such use rare?
(suppose Foo is a template class)
Foo<::myType> or Foo<Somenamespace::myType> or Foo<SomeClass::myType>
2,
Does Bjarne indicate qualified names used in a template coule be bound to a local name? For example, we define a local namespace, put a struct in the local namespace, then we could use localNameSpace::strctInLocalNameSpace to instantise the template?
Puesdu code like this.
Code:
void f()
{
// inside local function f
namespace localns {
struct foo;
};
vector<localns::foo> vc;
}
thanks in advance,
George