From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3067 invoked by alias); 20 Dec 2002 02:38:36 -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 2979 invoked by uid 61); 20 Dec 2002 02:38:35 -0000 Date: Thu, 19 Dec 2002 18:38:00 -0000 Message-ID: <20021220023835.2978.qmail@sources.redhat.com> To: a9804814@unet.univie.ac.at, gcc-bugs@gcc.gnu.org, gcc-prs@gcc.gnu.org, nobody@gcc.gnu.org From: bangerth@dealii.org Reply-To: bangerth@dealii.org, a9804814@unet.univie.ac.at, gcc-bugs@gcc.gnu.org, gcc-prs@gcc.gnu.org, nobody@gcc.gnu.org, gcc-gnats@gcc.gnu.org Subject: Re: c++/7308: template specialization in other namespace X-SW-Source: 2002-12/txt/msg01061.txt.bz2 List-Id: Old Synopsis: template-class member functions / namespace scope resolution in conjunction with template specialization New Synopsis: template specialization in other namespace State-Changed-From-To: open->analyzed State-Changed-By: bangerth State-Changed-When: Thu Dec 19 18:38:35 2002 State-Changed-Why: Problem 1 you describe is a well-known bug, namely that gcc does not presently implement two-stage name lookup. Problem 2 can be reduced to the following illegal code that gcc nevertheless compiles: ---------------------------- namespace NS_1 { namespace NS_2 { template struct C { void foo (); }; } template <> void NS_2::C::foo() {} } int main() { NS_1::NS_2::C c; } ------------------------- Specializations shall be _declared_ in the same namespace in which the general template is declared, if I understand correctly, i.e. there is at least a declaration in the inner namespace missing. http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=7308