unqualified name in template

Joined
Feb 12, 2008
Messages
108
Reaction score
0
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.

Code:
void f()
{
// inside local function f
namespace localns {
    struct foo;
};
vector<localns::foo> vc;
}


thanks in advance,
George
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,982
Messages
2,570,190
Members
46,740
Latest member
AdolphBig6

Latest Threads

Top