Topic: Declaring a template parameter as a friend class


Author: gyro@netcom.com (Scott L. Burson)
Date: Sat, 4 Dec 1993 00:38:02 GMT
Raw View
Consider the following declaration:

   template<class T>
   class A {
        friend class T;
        // ...
   };

Neither of the template processors I have been using allow the friend
declaration at all.  This surprises me; I would have thought that I would get
an error only if I actually tried to instantiate the template with a non-class
type argument.  (It wouldn't make sense to do that in my particular situation
anyway.)

Does the draft standard address this issue?

-- Scott