From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15578 invoked by alias); 3 Dec 2002 16:16:12 -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 15541 invoked by uid 71); 3 Dec 2002 16:16:10 -0000 Date: Tue, 03 Dec 2002 08:16:00 -0000 Message-ID: <20021203161610.15525.qmail@sources.redhat.com> To: nobody@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, From: Gabriel Dos Reis Subject: Re: c++/8772: Segmentation fault on 3 lines of template code Reply-To: Gabriel Dos Reis X-SW-Source: 2002-12/txt/msg00151.txt.bz2 List-Id: The following reply was made to PR c++/8772; it has been noted by GNATS. From: Gabriel Dos Reis To: Wolfgang Bangerth Cc: gcc-bugs@gcc.gnu.org, , , , Subject: Re: c++/8772: Segmentation fault on 3 lines of template code Date: 03 Dec 2002 17:06:38 +0100 Wolfgang Bangerth writes: | > | However, just for the record: I fail to see how this can be | > | made legal: when you write A::B to denote the template | > | type, B is a template dependent type, and one would think | > | one has to write a "typename" somewhere. But then we have | > | typename A::B | > | which is not the name of a type, but of a template. I don't | > | know what the standard says here, but I don't see a way to | > | make it legal in any case. | > | > This case seems to be forgotten by the standard. I think the | > following should make GCC happy. | > | > template | > struct D { | > enum { | > v = C::template B>::v | > }; | > }; | > | > Note the "template" keyword in front of B. | | Right, it does. | | | > The closest you can find in the standard is 14.2/ | > | > 4 | > When the name of a member template specialization appears after . or | ^^^^^^^^^^^^^^ | I think this is why you said it seems to have been forgotten? After all it | speaks about a specialization, which it is not in the code you posted. Right. | If you are sure that this is an oversight, I didn't intend to speak for the committee -- I can't and I don't want to. But I find the above wording overly restrictive. | why don't you bring it up with | the ISO committee? Already done ;-) -- Gaby