Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > dependent names

Reply
Thread Tools

dependent names

 
 
George2 George2 is offline
Senior Member
Join Date: Feb 2008
Posts: 108
 
      03-05-2008
Hello everyone,


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

http://womble.decadentplace.org.uk/c...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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem compiling template function with typename for dependent names antoniogarcar@gmail.com C++ 3 11-20-2012 10:59 AM
non-dependent vs. dependent template names puzzlecracker C++ 1 08-07-2008 07:42 AM
gcc, visual studio and dependent names mojmir C++ 3 11-11-2007 09:25 AM
Predefined macro names for machine dependent compilation utab C++ 3 07-05-2007 10:37 PM
Question about dependent names and typename Evan C++ 3 11-28-2006 09:37 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57