c++ - Templates :Name resolution:Dependent types: -->can any one tell some more examples for this statement? -


This is the statement from ISO C ++ standard 14.6.2.1: dependent type:

  A type dependent if it is - a template parameter, # 1 - a qualified-id with a nested-name-specifier containing a class name that gives a dependent type name or whose ineligible-id name is one dependent Type, # 2 - A CV-eligible type where the CV-dependent type is dependent, # 3 - A mis-made of a dependent type Type type, # 4 - An array type created by any dependent type or whose size is specified by continuous expression, which is value-dependent, # 5 - A template-id containing the template name template parameter or any template argument one Dependent type or expression that is type-dependent or value-dependent. # 6  

Am I unable to understand the last two points?

Can anybody give examples for these statements (especially the last # 5, # 6)?

:
  template & lt; Typename t, int n, template & lt; Typename & gt; Square My_Template & gt; An array type created by any dependent type or whose size is specified by a static expression which is value-dependent,  
     T one [5]; Dependent type B1 // Sir B [n]; // Price-dependent size  

6 - Template-id in which the template name is a template parameter, or any template argument is a dependent type or expression type-dependent or value-dependent.

  My_Template & lt; Int & gt; C; // Template Parameter Some_Template & lt; T & gt; D; // template logic is up to date; Another_Template & lt; Sizeof c & gt; E // Type-dependent expression; Other_mapplet & lt; N & gt; F; // value-dependent expression};  

Comments