dependent names

Joined
Feb 12, 2008
Messages
108
Reaction score
0
Hello everyone,


I have made some study on this. Here is something I found confused.

http://womble.decadentplace.org.uk/c++/template-faq.html#dependent

--------------------
What are dependent names?

A: Dependent names are names whose definitions are considered to depend upon the template parameters and for which there is no declaration within the template definition. They are resolved only when the template is instantiated. Those that are intended to refer to types or templates may require disambiguation.

If the resolution of a dependent function name uses argument-dependent lookup, declarations in the arguments' namespaces that are visible at the point of instantiation will be considered as well as declarations visible at the point of definition. (The former is normally a superset of the latter, but may not be.)
--------------------

Two confusions,

1. What means " for which there is no declaration within the template definition"?

2. What means "declarations in the arguments' namespaces that are visible at the point of instantiation will be considered as well as declarations visible at the point of definition."?

Could you show some pseudo code please?

BTW: I feel I lack some knowledge of template programming in-depth even if I use STL template everyday. I tried ti read appendix C for Bjarne's book, and it contains more confusing terms about dependent names (e.g. section C.13.8.1).


regards,
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,995
Messages
2,570,226
Members
46,815
Latest member
treekmostly22

Latest Threads

Top