From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19848 invoked by alias); 8 Jan 2003 19:16:08 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 19825 invoked by uid 71); 8 Jan 2003 19:16:06 -0000 Date: Wed, 08 Jan 2003 19:16:00 -0000 Message-ID: <20030108191606.19824.qmail@sources.redhat.com> To: nobody@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, From: Gabriel Dos Reis Subject: Re: c++/9230: Friend definitions in template classes Reply-To: Gabriel Dos Reis X-SW-Source: 2003-01/txt/msg00555.txt.bz2 List-Id: The following reply was made to PR c++/9230; it has been noted by GNATS. From: Gabriel Dos Reis To: reichelt@igpm.rwth-aachen.de Cc: bangerth@ticam.utexas.edu, gcc-bugs@gcc.gnu.org, gcc-prs@gcc.gnu.org, nobody@gcc.gnu.org, gcc-gnats@gcc.gnu.org Subject: Re: c++/9230: Friend definitions in template classes Date: 08 Jan 2003 20:07:15 +0100 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