This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: c++/9230: Friend definitions in template classes


reichelt@igpm.rwth-aachen.de writes:

| Synopsis: Friend definitions in template classes
| 
| State-Changed-From-To: open->feedback
| State-Changed-By: reichelt
| State-Changed-When: Wed Jan  8 09:14:33 2003
| State-Changed-Why:
|     As I read paragraph 14.6.5.1 in the standard, this is the expected behavior:
|     
|     > Friend classes or functions can be declared within a class template. When
|     > a template is instantiated, the names of its friends are treated as if
|     > the specialization had been explicitly declared at its point of instantiation.

Declared *where*?


|     Convinced, Wolfgang?

I'm not Wolfgang but I'm not convinced.  Read on 14.6.5/2:

  As with non-template classes, the names of namespace-scope friend
  functions of a class template special-ization are not visible during
  an ordinary lookup unless explicitly declared at namespace scope
  (11.4). Such names may be found under the rules for associated
  classes (3.4.2).

-- Gaby


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]