From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8305 invoked by alias); 29 Apr 2003 14:26:01 -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 8288 invoked by uid 71); 29 Apr 2003 14:26:00 -0000 Date: Tue, 29 Apr 2003 14:26:00 -0000 Message-ID: <20030429142600.8287.qmail@sources.redhat.com> To: nobody@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, From: Wolfgang Bangerth Subject: Re: libstdc++/10505 Reply-To: Wolfgang Bangerth X-SW-Source: 2003-04/txt/msg01344.txt.bz2 List-Id: The following reply was made to PR libstdc++/10505; it has been noted by GNATS. From: Wolfgang Bangerth To: Christian Ehrhardt Cc: gcc-gnats@gcc.gnu.org Subject: Re: libstdc++/10505 Date: Tue, 29 Apr 2003 09:25:19 -0500 (CDT) [I guess we should continue in English and add this to the audit trail.] > Hm, ja. Scheint so. Allerdings lassen sich IMHO die praeprozessierten > Sourcen auf folgendes Problem reduzieren, was IMHO legalerweise abgelehnt > wird: > > template > class Bar { > A barelem; > }; > > class Foo { > Bar fooelem; > }; Correct, this code is illegal. > Bleibt die Frage, ob das urspruengliche Konstrukt irgendwie legal ist: > > class Foo > { > public: > int x; > std::list children; > }; I think this should be legal code. It would only be illegal if std::list would have member variable of type _T_, rather than _T*_. I am not aware of any wording in the standard, but I would guess that the intent certainly is _not_ to have such members, but store the data in a linked list and have pointers to it. > Auch hier wird std::list<> mit Foo instanziiert. Bei der normalen > Implementierung wird dabei offenbar nur ein Zeiger auf Foo irgendwo > angelegt, mit --enable-concept-checks dagegen ein echtes Element > vom Typ Foo, was nicht gehen kann. Wenn std::list in der Beziehung > irgendwelche Zugestaendnisse macht, dann koennte es sein, dass der > concept checks code buggy ist, ansonsten wuerde ich das bei naeherer > Betrachtung als user error ablehnen. Was meinst Du? Given the above, I would claim that the concepts check is in error. It checks a requirement at the time of instantiation of the class that is only needed at the time where actual member functions are instantiated. I see no reason why the given code should be illegal. W. ------------------------------------------------------------------------- Wolfgang Bangerth email: bangerth@ices.utexas.edu www: http://www.ices.utexas.edu/~bangerth/