"Grizlyk" <[EMAIL PROTECTED]> writes:

> It is pity, i have no "[temp.dep], 14.6.2(3) in the C++ Standard".

Do you mean you don't have the C++ Standard, or that your copy
doesn't have section 14.6.2(3)?

Here is what it says:

  In the definition of a class template or in the definition of a
  member of such a template that appears outside of the template
  definition, if a base class of this template depends on a
  template-parameter, the base class scope is not examined during
  name lookup until the class template is instantiated.

  [Example: 
     typedef double A; 
     template<class T> B { 
       typedef int A; 
     }; 
     template<class T> struct X : B<T> { 
       A a; // a has type double 
     }; 

     The type name A in the definition of X<T> binds to the typedef
     name defined in the global namespace scope, not to the typedef
     name defined in the base class B<T>. 
  ]

> So can you explain me the reason of the hiding?

I don't know why this section was written that particular way,
but there probably was a good reason for this, since this is
somewhat unexpected. The reason possibly has to do with the fact
that template specializations can almost completely change class
interface.

Language experts over in comp.lang.c++ may have a ready explanation.

Cheers,
-- 
In order to understand recursion you must first understand recursion.
Remove /-nsp/ for email.
_______________________________________________
help-gplusplus mailing list
help-gplusplus@gnu.org
http://lists.gnu.org/mailman/listinfo/help-gplusplus

Reply via email to