From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1441 invoked by alias); 11 Feb 2007 03:55:49 -0000 Received: (qmail 1395 invoked by uid 48); 11 Feb 2007 03:55:39 -0000 Date: Sun, 11 Feb 2007 03:55:00 -0000 Message-ID: <20070211035539.1394.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug c++/30431] failure to check for visible declaration of friend function to template class In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "bangerth at dealii dot org" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2007-02/txt/msg01165.txt.bz2 ------- Comment #3 from bangerth at dealii dot org 2007-02-11 03:55 ------- As one data point: if it indeed finds the local function foo, then one could think that declaring the friend as friend T ::foo<>(const CTest &test); might work (note the explicit global scope on the function name). Alas: bangerth/x> /tmp/bangerth/bin/bin/gcc -c x.cc x.cc:20: error: non-template 'foo' used as template x.cc:20: note: use 'T::template foo' to indicate that it is a template x.cc:20: error: type 'T' is not derived from type 'CTest' I must admit that I don't really know what the compiler is trying to tell me here, it certainly doesn't make much sense... W. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30431